# DP: Set site-packages/dist-packages --- ./Lib/site.py.orig 2010-03-21 18:13:31.157072041 +0100 +++ ./Lib/site.py 2010-08-03 22:34:35.030577001 +0200 @@ -19,6 +19,12 @@ resulting directories, if they exist, are appended to sys.path, and also inspected for path configuration files. +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/dist-packages, Debian addons +install into /usr/{lib,share}/python/dist-packages. +/usr/lib/python/site-packages is not used. + A path configuration file is a file whose name has the form .pth; its contents are additional directories (one per line) to be added to sys.path. Non-existing directories (or @@ -265,10 +271,13 @@ if sys.platform in ('os2emx', 'riscos'): sitedirs.append(os.path.join(prefix, "Lib", "site-packages")) elif os.sep == '/': + sitedirs.append(os.path.join(prefix, "local/lib", + "python" + sys.version[:3], + "dist-packages")) sitedirs.append(os.path.join(prefix, "lib", "python" + sys.version[:3], - "site-packages")) - sitedirs.append(os.path.join(prefix, "lib", "site-python")) + "dist-packages")) + sitedirs.append(os.path.join(prefix, "lib", "dist-python")) else: sitedirs.append(prefix) sitedirs.append(os.path.join(prefix, "lib", "site-packages"))