[Distutils] virtualenv and buildout integration ?
Chris Withers
chris at simplistix.co.uk
Mon Sep 7 17:12:40 CEST 2009
Gary Poster wrote:
>
> In the simplest case:
>
> allowed-eggs-from-site-packages =
>
> That means you don't allow any eggs from site packages. So, this means
> that if one of your direct or indirect dependencies is docutils, and
> docutils is installed as an egg in your system, when the eggs for your
> buildout are assembled, the system egg will be ignored, and buildout
> will go on the hunt for one someplace else. The typical result is that
> the egg that it finds will be earlier in the site path, so it has
> precedence in scripts and so on.
Ah, OK :-)
> Alternatively, consider this.
> allowed-eggs-from-site-packages =
> lxml
>
> That is, you only allow the lxml egg from site packages. All the rest
> will be ignored, as per the description above.
Hmm, okay, but what ensures the version of lxml found in site packages
doesn't match the one required by the buildout?
> allowed-eggs-from-site-packages
> This option interacts with the ``include-site-packages`` option in the
> following ways.
>
> If ``include-site-packages`` is true, then
> ``allowed-eggs-from-site-packages`` filters what eggs from
> site-packages
> may be chosen.
Cool :-)
> If ``include-site-packages`` is false, the value of
> ``allowed-eggs-from-site-packages`` is irrelevant.
I'd suggest an exception should even be raised in this case...
> The next simplest answer is to use the new "include-site-packages =
> false" option. That's a tiny bit like using a virtualenv for your
> buildout, in that you are using the system executable but a clean
> site-packages.
Yep, this we like :-)
cheers,
Chris
--
Simplistix - Content Management, Batch Processing & Python Consulting
- http://www.simplistix.co.uk
More information about the Distutils-SIG
mailing list