Ideas on distributing and promoting Plone packages
by Tarek Ziadé
Edit: Just after I posted this, I found Sidnei’s work, so it is basically what I was thinking of. Good job 🙂
How to promote Plone packages today ?
Since eggs became a standard in Zope, distribution of Plone packages can be done directly to the Cheeseshop. This is quite nice since anyone can invoke an upload command like this:
$ python setup.py bdist_egg upload
This makes the package uploaded and available to anyone. This also made anyone able to promote his work without having to set up a web site or to study how the community works on that point.
I am pretty new to the Plone community, and I am trying to find the best way to promote Plone packages we do here.
My guess is that the Cheeseshop is perfect for Python package but not enough for Plone packages: in order to promote them, the best place is the plone.org software center. It brings a tracker, a front page and a release folder. In other words, anyone who wants to publish a Plone product that is seen by the whole community has to take care of uploading its packages into plone.org, or setting a link there, and to the cheeseshop.
If you have a better way to promote your Plone products, let me know !
I think this process could be enhanced a little bit through automation.
Making plone.org pypi-compatible
The Pypi index has two main features PloneSoftwareCenter does not afaik:
- it implements a file_upload method, that is called by setuptools when the upload command is invoked
- it provides package index pages that allow easy_install to look for a package
These two features are very simple, and could be added in Plone Software Center by:
- adding a file_upload view on the products page
- providing an index-compatible view (PSC has a DOAP support though)
In other words, that would allow calling the upload command on plone.org like this:
$ python setup.py bdist_egg upload --repository=http://plone.org/products/
Another command could be added in setuptools to distribute a plone package automatically:
$ python setup.py plone_promote
plone_promote would invoke bdist_egg then make an upload on cheeseshop and/or plone.org. In other words, that would allow package developers to promote their work without pain.
Having such feature would also allow people to create their own Pypi-compatible private software center when they deal with private package they want to make available for instance to private project buildouts.
If people think it’s a good idea, I am willing to code it in PSC (I made a proposal on the bug tracker).
Tarek,
I’d love to see this added to PSC. It has been in the cards for a while — as you can see from Sidnei’s post — but we need somebody to own/champion it to make it happen in PSC proper.
If you’re willing to do this, we’re more than willing to help you out and improve PSC for this purpose.
🙂
I think when Sidnei first wrote this, he was ahead of his time. Now, it makes a lot of sense. I’ve stopped making plone.org releases for many package just because it’s too much hassle, which is of course not a good thing. Having this in PSC would be great.
If you have some cycles to commit to it, please, please do! Get in touch with Alex Clark and Steve McMahon who are looking after PHC and PSC these days, or the dev list.
@Alex and Martin: Ok i am willing to lead on this. I’ll get in touch with Sidnei and all this people to see how we can work this out.
Don’t forget to “sdist upload” too!
Also, note that you can use “setup.py alias plone_promote sdist bdist_egg upload –repository=whatever” to create a local command definition for the project, without needing to write any code.
setup.py bdist_egg is a Bad Idea for Linux packages — the various Pythons found in various distros aren’t binary-compatible. Use sdist on Linux and bdist_egg on Windows.
Indeed! Can we merge the branch to trunk perhaps? (For starters)
@Phillip, good shortcut to know
@Marius, i guess the command will have to cover all use cases anyway
@Alex, sounds good, I’ll start a thread on plone-dev asap for feedback. I’ve read the threads on this topic, and got a mail from sidnei about the branch. It looks like the last issue to discuss is about trove categorization: they are “fixed” on Pypi and customizable on PSC side, so we have to come up with a smooth solution here.
After this discussion we can merge the branch and finish the work I guess.
-1 for uploading bdist_egg distributions: they subtract
value from the pool. The only exception I can think
of would be packages containing C extensions: uploading
Windows bdist_egg versions is an act of compassion,
since many Windows users might not have the compiler
/ headers with which to build them.