This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: add /usr/local support
Type: Stage:
Components: Installation Versions:
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: loewis, noodlez84
Priority: normal Keywords:

Created on 2006-02-10 01:55 by noodlez84, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (3)
msg27471 - (view) Author: Karol Pietrzak (noodlez84) Date: 2006-02-10 01:55
Generally, /usr/local support needs to be added for   
python.  Many distributions already do this, either   
partially or completely, causing inconsistencies   
between Python installations among Linux   
distributions.   
   
1. There should be a site-packages directory   
in /usr/local,   
probably /usr/local/lib/python/site-packages.  Just   
like in /usr, it'll need the appropriate symlinks.    
x86_64 bit issues also need to be taken into account,   
so /usr/local/lib64/python2.4/site-packages should be   
the local site-packages directory for Python 2.4.x on   
a x86_64 machine.   
   
The reasons for these are numerous.  $PATH   
contains /usr/local/bin, $GTK_PATH   
contains /usr/local, $MANPATH   
contains /usr/local/share/man, and $PKG_CONFIG_PATH   
contains /usr/local/lib/pkgconfig.  Adding a   
site-packages directory in /usr/local will simply   
fill in the hole in the Python configuration.   
   
As the FHS points out, /usr may very well be mounted   
read-only for security purposes.  /usr/local should   
be used instead, especially for non-system / testing   
software.   
   
2. Distutils should install, by default, in   
the site-packages directory in /usr/local described  
in part (1).  This will simply mimic the auto(conf| 
make|etc.) default installation path (isn't the  
default installation path for Python  
itself /usr/local?).  
  
For simplicity and consistency's sake, the default  
installation path for distutils should be the 
site-packages directory in /usr/local. 
 
If someone would point me in the right direction, I 
will gladly write the patch myself. 
msg27472 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-02-13 05:05
Logged In: YES 
user_id=21627

I fail to see the bug in Python here. In the default
configuration, Python does use site-packages in /usr/local,
and distutils does install into /usr/local. So it appears
that Python already does what you say you want.

Apparently, you are talking about Linux here. However, even
on Linux, Python installs to /usr/local by default. If Linux
distributors chose to install it into /usr, then why can't
they also arrange these other changes?

To get /usr/local<something> into sys.path, either edit
site.py, or add a file sitecustomize.py. At compile time,
you can also edit Modules/Setup[.local] to set SITEPATH.

To change the default installation directories, add a
distutils.cfg into the distutils directory, or edit the
unix_prefix scheme in command/install.py
msg27473 - (view) Author: Karol Pietrzak (noodlez84) Date: 2006-02-13 13:19
Logged In: YES 
user_id=474815

Thanks for the response loewis! 
 
I apologize for mis-construing how Python is configured.  
It's easy to do because few compile their own Python; most 
just use the binary for their distribution. 
 
Based on your response, then yes, Python already does what 
I want, and the bug is in the packaging of my 
distribution--SuSE 10.0 x86_64.  For those interested in 
following this, the SuSE bug this relates to is: 
https://bugzilla.novell.com/show_bug.cgi?id=149809 
History
Date User Action Args
2022-04-11 14:56:15adminsetgithub: 42882
2006-02-10 01:55:04noodlez84create