[Distutils] Packaging buildout-based project for release
Travis Jensen
travis.jensen at oracle.com
Wed May 28 19:58:35 CEST 2014
Hi, all,
I'm hoping for some advice. I've got a Django web app that I've used
buildout to build. It includes effectively three source trees (a Celery
task tree, a set of re-usable Django database models, and the actual
Django web application project. Yes, these could all be different repos,
and if they should be, I will make them such, it just makes early
development much easier. :) Each of them has their own setup.py since
they each have their own deployment story (celery tasks on worker
systems, shared models just about anywhere, and the web app on the web
tier). buildout's collective.recipe.template and collective.recipe.cmd
are also being used to install node modules (lessc, coffeescript, and
yuglify).
So, one option for deploying is "git clone myproj.git && cd myproj &&
buildout". I'm not a fan for a variety of reasons: it is *slow*; it is
not necessarily deterministic (even with version pinning on our own
simple index, somebody could replace a file); and it requires additional
software to be installed on production systems that I'd rather not be
installed. An ideal world would solve all of them. but I could live with
the (unlikely) non-determinism.
I'm really happy with the automation of the development environment that
buildout gives. The question is whether I can take that and turn it into
a deployable system or if I should be looking somewhere else. An ideal
world would be three RPMs (and a "meta"-RPM that installed all three)
with all the Python and Node dependencies built in.
I have seen
http://grok.zope.org/documentation/tutorial/introduction-to-zc.buildout/source-binary-and-rpm-experiments
but, unfortunately, it is hard to follow without the various .cfg files
(well, the entire source would probably be more helpful) it references.
Is there a way to make this work, or should I just use a local buildout
as a starting point to put together RPMs (not sure how to handle script
with hard-coded paths; I suppose there is always sed :).
Finally, how does one get virtualenv and RPMs to play together? It
isn't, strictly speaking, necessary, since I technically only need
zc.buildout to be installed, and I could live with that in the system
packages. I definitely don't want all of my dependencies installed in
the system packaged, though!
Cheers.
tj
More information about the Distutils-SIG
mailing list