Re: [Distutils] repeatable and updatable virtualenv
2010/3/19 Brad Allen <bradallen137@gmail.com>:
On Fri, Mar 19, 2010 at 10:23 AM, Saint Germain <saintger@gmail.com> wrote:
2010/3/19 Brad Allen <bradallen137@gmail.com>
On Tue, Mar 16, 2010 at 2:26 AM, Chris Withers <chris@simplistix.co.uk> wrote:
Hi All,
How can I set up a virtualenv in such a way that I can version control the packages and their versions that are installed in it?
The answer would appear to a custom bootstrap script, but how would I think update an existing virtualenv when I added or removed packages or changed the version of a specific package?
You could try envbuilder; I find it very helpful for setting up development environments repeatably when developing several related packages ('er, 'module distributions') simultaneously.
It basically just creates a virtualenv, checks out/clones whatever you specify in the .env confiig file, and runs setup.py develop on each of the checked out packages into the virtualenv. Also, it provides a way to apply commands across all the checked out packages (like 'update' or 'status')
http://pypi.python.org/pypi/envbuilder/0.1.4
I think a similar functionality can be had using buildout with mr.developer, but I have not tried it yet. However as far as I know, buildout does not create a virtualenv (yet).
I'm currently trying more or less the same thing by combining buildout with virtualenv and pip. So far it's working without problem except the installation of develop eggs (see my other message).
Buildout can create virtualenv without problem (see http://pypi.python.org/pypi/rjm.recipe.venv/0.7) and can use pip to install editable package (see http://pypi.python.org/pypi/gp.recipe.pip) under version control (CVS, SVN, Mercurial...)
Thanks for the tip!
Now if only I can solve the develop eggs issue, I would be very happy !
What is that issue?
See here: http://mail.python.org/pipermail/distutils-sig/2010-March/015729.html I think that it's not a bug or a missing functionality but it's just that I haven't fully understand the whole thing about develop eggs. The eggs are correctly generated but I haven't managed to install them automatically. Anyway after it is solved, I can confirm that buildout + distribute + virtualenv + pip is a very powerful combination ! Don't hesitate to ask questions if you want to use the same approach. There are some points which are still rough and I need to send some patch upstreams. But mainly it works (and rocks). Regards,
participants (1)
-
Saint Germain