Creating and using eggs
Now, I have convinced all of them that the best-practice is to create eggs for their developments. If we live in a python environment (it doesn't matter whether we use Plone, plain Zope, Django or plain Python), and we create small reusable libraries, we have to create them in the same way the community creates. And that way is to create eggs.
OK, we already know how to create eggs, all my colleagues have ZopeSkel installed and almost all of them, even Django developers, use zc.buildout for their projects (well, not all of them, like in 50 B.C. one small village of indomitable Gauls still holds out against the invaders....). But just creating eggs is not enough to be a good citizen. We use zc.buildout to have easily repeateable and predictable working environments, so we need to have a centralized repository (or more than one) to save all those eggs. And as we also use SVN to save our code, we need to create tags with our packages and then upload to somewhere from where our buildouts will download them.
We use a script called release-egg.sh for that. It's a small script. It just sets the version number in setup.py and version.txt (if it exists), commits the changes to the SVN, creates a SVN tag, and then creates a distribution tar with that version. After that, it presents 3 options: upload to a statically served Apache directory, upload to CodeSyntax.com and upload to PyPI. Until now, we only used the first option, from now on, we will be using also the second one for our own developments. We have to open our doors and show the world what we do.
You may be interested in these other articles
JakiZU! promoting food sustainability
Oct 28, 2024