[Distutils] How to force bootstrap.py to download setuptools/distribute?
attilaolah at gmail.com
Wed Aug 25 06:42:03 CEST 2010
Is it possible to force bootstrap.py to download the setuptools or
distribute egg even though it can be found on the system? Not
downloading a fresh copy will cause issues in some edge cases, for
example take the following situation:
Say my site-packages are located in /usr/lib/python2.6/site-packages/.
Then, I set my PYTHONPATH to contain
/usr/local/lib/python2.6/site-packages/ (note *local*).
Then, I install distribute or setuptools into
Then, I install a third party package, say lxml, also to
Then, in my project, I run python bootstrap.py (with or without the
--distribute flag, depending on which package I have in
Then, bootstrap.py will not download a fresh copy, instead it will add
/usr/local/lib/python2.6/site-packages/ to sys.path so that it can use
the existing one.
Then, say I have the following buildout.cfg:
develop = .
include-site-packages = false
I would now expect buildout to not include lxml from my PYTHONPATH,
but build it instead and put it in my eggs-dir. However, it's not the
case: adding /usr/local/lib/python2.6/site-packages/ to sys.path will
make lxml available so buildout will not build it.
My question is, how can I force buildout to build its own lxml, or
better yet, force it to download a fresh setuptools or distribute egg,
avoiding adding extra stuff to sys.path, thus making unnecessary
system packages available and, thus, not putting them in the eggs-dir.
Note, this is zc.buildout 1.5.0. I hope I gave enough details.
More information about the Distutils-SIG