On Tue, Mar 11, 2008 at 08:43:06AM +0100, Matthias Klose wrote:
> Currently Debian's python has /usr/local/lib/python2.x/site-packages
> in sys.path allowing for installation of local modules.  Barry did
> point out that this conflicts with a python installation, where
> /usr/local is the default prefix, and the system python gets modules
> from the local installation.  Some suggestions were made to fix this:
[...]
>  - add another path (e.g. /usr/local/python/lib2.x/site-packages),
>    and remove the /usr/local/lib/python2.x/site-packages path after
>    the next release. Does provide an upgrade path, but doesn't solve
>    the probem immediately.

Discussion on distutils-sig[1] seems to point out that no Python
people are even remotely interested in having this functionality (only
SUSE seems to agree with Debian).  So the chances of Python coming up
with a directory they like for this are very slim.

The best solution that no one disagreed with was placing /usr/local
after everything else on sys.path so that you can't overwrite stuff
installed to /usr without using PYTHONPATH (and knowing what you're
doing).

This could be achieved easily with this patch to
/usr/lib/python2.5/site.py:

--- site.py     2008-04-23 20:51:34.000000000 +0100
+++ site.py     2008-04-23 20:51:42.000000000 +0100
@@ -171,7 +171,7 @@
     prefixes = [sys.prefix]
     if sys.exec_prefix != sys.prefix:
         prefixes.append(sys.exec_prefix)
-    prefixes.insert(0, '/usr/local')
+    prefixes.append('/usr/local')
     for prefix in prefixes:
         if prefix:
             if sys.platform in ('os2emx', 'riscos'):


Would this be a suitable solution for Debian?


Regards
Floris


[1] Seeming to conclude around here:
    http://mail.python.org/pipermail/distutils-sig/2008-April/009391.html

-- 
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to