On 12/05/2017 11:57 PM, Richard Laager via devel wrote:
 From my reading of that wiki page, the distro-packaged Python uses
dist-packages whenever stock Python would use site-packages. This way,
if you install the distro Python package *and* Python from source, you
can install modules for each and they don't conflict. Modules for the
distro-packaged Python go in dist-packages, and modules for the
source-built Python go in site-packages.

Debian, distro Python, prefix = /usr (e.g. the ntpsec package):
     /usr/lib/python<ver>/dist-packages

Debian, source Python, prefix = /usr (e.g. not a great idea):
     /usr/lib/python<ver>/site-packages

Debian, distro Python, prefix = /usr/local (e.g. ntpsec from source):
     /usr/local/lib/python<ver>/dist-packages

Debian, source Python, prefix = /usr/local (e.g. both from source):
     /usr/local/lib/python<ver>/site-packages

Other distros, assuming they don't patch in dist-packages, have only
site-packages.

non-Debian, prefix=/usr (e.g. ntpsec package):
     /usr/lib/python<ver>/site-packages

non-Debian, prefix=/usr/local (e.g. ntpsec from source):
     /usr/local/lib/python<ver>/site-packages

So if I am understanding this correctly I can wipe the dist/site fix as it was doing the Right Thing already, for distribution specific values of Right Thing.

 From ianbrunene later on IRC:
   import distutils.sysconfig
   print(distutils.sysconfig.get_python_lib(
       standard_lib=0, prefix='/usr/local'));

Instead of the hard-coded '/usr/local', pass in whatever --prefix was
passed to waf.

Yes, waf already deals with the prefix, with a default of /usr/local. I was trying to trace where the breakage came from.

--
/"In the end; what separates a Man, from a Slave? Money? Power? No. A Man Chooses, a Slave Obeys."/ -- Andrew Ryan

/"Utopia cannot precede the Utopian. It will exist the moment we are fit to occupy it."/ -- Sophia Lamb

_______________________________________________
devel mailing list
devel@ntpsec.org
http://lists.ntpsec.org/mailman/listinfo/devel

Reply via email to