[Distutils] Isolation, virtualenvs and buildout
jim at zope.com
Mon Nov 11 16:46:27 CET 2013
On Mon, Nov 11, 2013 at 10:26 AM, Achim Domma <domma at procoders.net> wrote:
> I'm used to virtualenvs and I think I understood the general idea of build out. I need to build a pice of software out of several independent Python packages and I think buildout is the tool to use. But I don't get how buildout and virtualenv are related to each other. Asking Google, I found some hints that buildout is supposed to provide the same kind of isolation as virtualenvs - but only in the "old" 1.x version. The "new"(?) 2.0 version will change that. So I'm totally confused and ask for help.
Buildout1 tried to provide isolation, but it was incomplete and too
hard to maintain.
virtualenv works crazy hard to provide isolation. (/me applauds virtualenv.)
Many people run buildout inside virtualenvs. Personally, I always keep a
unadulterated Python around that I run buildout with. Buildouts main
is that it doesn't install things into site packages and won't mess up
your clean Python
or your virtualenv. You could use virtualenv to make yourself a
clean Python and
run any number of buildouts with that virtualenv.
> My use case is simple: I have some python modules on our private pypi server and would like to deploy a pice of software composed out of them (including all dependencies).
That's similar to our use cases.
> Any starting guidance would be very appreciated!
FWIW, here's a script I use to make RPMs out of buildouts:
It builds on zc.sourcerelease, which builds self-contained
source tar balls.
We (ZC) deploy *software* using RPM and use other buildout based tools
to deploy application configuration.
I suspect in the future we'll to docker or maybe something simpler
than RPM, which doesn't really match our use cases very well and tends
to cause us no end of pain.
More information about the Distutils-SIG