touch-packages team mailing list archive
-
touch-packages team
-
Mailing list archive
-
Message #48951
[Bug 821000] Re: setuptools and distribute don't prepend PYTHONPATH to sys.path
** Also affects: python-setuptools (Ubuntu)
Importance: Undecided
Status: New
** Changed in: python-setuptools (Ubuntu)
Assignee: (unassigned) => Barry Warsaw (barry)
--
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to python-setuptools in
Ubuntu.
https://bugs.launchpad.net/bugs/821000
Title:
setuptools and distribute don't prepend PYTHONPATH to sys.path
Status in tools to distribute python packages:
New
Status in python-setuptools:
Unknown
Status in Tahoe, the Lovely Accessible File System:
New
Status in distribute package in Ubuntu:
Confirmed
Status in python-setuptools package in Ubuntu:
New
Bug description:
This is a long-standing issue in setuptools, which was copied into
distribute when distribute forked. There exist patches the attempt to
fix the issue offered against both setuptools and distribute. There
are tickets in the setuptools issue tracker, distribute issue tracker,
and the Tahoe-LAFS issue tracker (where we maintain a fork of
setuptools in order to fix this among other outstanding bugs).
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, and true if you apply the following patch to either
setuptools or distribute:
Index: setuptools/command/easy_install.py
===================================================================
--- setuptools/command/easy_install.py (revision 560)
+++ setuptools/command/easy_install.py (revision 562)
@@ -1365,5 +1365,5 @@
"import sys; new=sys.path[sys.__plen:];"
" del sys.path[sys.__plen:];"
- " p=getattr(sys,'__egginsert',0); sys.path[p:p]=new;"
+ " p=getattr(sys,'__egginsert',len(os.environ.get('PYTHONPATH','').split(os.pathsep))); sys.path[p:p]=new;"
" sys.__egginsert = p+len(new)\n"
) % data
To manage notifications about this bug go to:
https://bugs.launchpad.net/distribute/+bug/821000/+subscriptions