[Distutils] repeatable and updatable virtualenv

Carl Meyer carl at oddbird.net
Tue Mar 16 16:23:30 CET 2010

Chris Withers wrote:
> Okay, but I think you said at pycon that pip won't work with binary or
> .egg distributions?

True; IIUC the plan is to eventually support some form of binary package
for Windows, but currently binary packages are not supported at all. I
don't have the need for binary packages; if I did I imagine my first
step would involve version-controlling a simple shell script using
easy_install or something. Or if that became unwieldy I'd look to a
buildout-based solution?

> Does it play nicely with multiple indexes, some of which may be private
> and require http authentication?

Multiple indexes, sure; you can replace PyPI or layer an additional
index on top of it, or just use --find-links with a directory. HTTP auth
I don't believe is supported, though I'm not completely sure; wouldn't
be hard to add, pip just uses urllib2.

>> Alternatively, if you want to be paranoid and you don't mind things
>> being a little slower (though not much if you have a local
>> PIP_DOWNLOAD_CACHE), you just create a new virtualenv each time you
>> deploy. 
> That won't necessarily fly... where would you put data files? outside
> the virtualenv? feels a bit weird to me, but that may just be a
> hysterical raisin...

Nothing goes inside my virtualenvs except code installed via pip. The
virtualenv is a deployment artifact, not a folder container for my
project. My project code checkout, any data files, anything I care about
goes in its own location outside the virtualenv. I'm sure that does seem
odd coming from a buildout background, but AFAICS there's no good reason
to ever manually touch files inside the virtualenv directory, and lots
of good reasons not to.


More information about the Distutils-SIG mailing list