How to insert my own module in front of site eggs?

spartan.the spartan.the at gmail.com
Sun Nov 20 15:44:26 EST 2011


On Nov 18, 3:36 am, Roy Smith <r... at panix.com> wrote:
...
> It just seems mind-boggling to me that PYTHONPATH doesn't preempt
> everything else.

I was surprised too, but this issue is widespread. Best explained
here:
https://bugs.launchpad.net/tahoe-lafs/+bug/821000/comments/0
Quote:

"
The crux of the problem is that the Python documentation says:
  "The PYTHONPATH variable can be set to a list of paths that will be
added to the beginning of sys.path."
http://docs.python.org/install/index.html#modifying-python-s-search-path
This is true with standard distutils, false with setuptools, false
with distribute...
"

Phillip J. Eby (setuptools guy) was religious about "easy installed"
packages over anything else to comment on this issue 3 years ago:

"
This behavior change is unacceptable, as it makes it impossible to
ensure that
an easy_install-ed package takes precedence over an existing,
distutils-installed version of the same package in the same PYTHONPATH
directory.

Please note that that is the intended default behavior of
easy_install: if you
wish to override it, you should use --multi-version, and explicitly
select the
egg(s) to be added to sys.path instead.
"
(http://bugs.python.org/setuptools/issue53)



More information about the Python-list mailing list