classification
Title: document that some distributions change site.py defaults
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.3, Python 3.4, Python 2.7
process
Status: closed Resolution: works for me
Dependencies: Superseder:
Assigned To: docs@python Nosy List: barry, docs@python, doko, georg.brandl
Priority: normal Keywords: patch

Created on 2013-04-14 08:43 by georg.brandl, last changed 2014-01-29 18:53 by georg.brandl. This issue is now closed.

Files
File name Uploaded Description Edit
site-patch.diff georg.brandl, 2013-04-14 08:43 review
Messages (3)
msg186897 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2013-04-14 08:43
From the docs@ list:
"""
Dear all,

the first paragraph of the documentation for the site module states that site.py constructs four directories using a head and tail part, and that

one of the tail parts would be lib/pythonX.Y/site-packages on UNIX/Mac.

However, in my Python 3.2 installation on Ubuntu 12.04 this is actually lib/python3/dist-packages (so no .Y and a different subdirectory) !

This is also stated in the module’s doc string.

I don’t know why the Python documentation says something else, but that should be fixed.
"""

Attached a patch to explain why the defaults may look different on some distributions.  Please review.
msg186904 - (view) Author: Matthias Klose (doko) * (Python committer) Date: 2013-04-14 10:30
the local patch adds as documentation on Debian/Ubuntu:

"""
For Debian and derivatives, this sys.path is augmented with directories
for packages distributed within the distribution. Local addons go
into /usr/local/lib/python<version>/dist-packages, Debian addons
install into /usr/lib/python3/dist-packages.
/usr/lib/python<version>/site-packages is not used.
"""

I can improve the local information, but I'm not sure how much should be added/changed in the upstream documentation.

So maybe we should add an option for python-config to get the site dirs, or the list of site dirs too?
msg209667 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2014-01-29 18:53
Matthias and I agreed this isn't necessary since on the relevant distribution it's already documented.
History
Date User Action Args
2014-01-29 18:53:49georg.brandlsetstatus: open -> closed
resolution: works for me
messages: + msg209667
2013-04-14 10:30:05dokosetmessages: + msg186904
2013-04-14 08:43:34georg.brandlcreate