Author matejcik
Recipients Arfrever, akitada, andybuckley, barry, belopolsky, catalin.iacob, christian.heimes, cstratak, doko, eric.araujo, ivazquez, jafo, jcea, lemburg, matejcik, piotr.dobrogost, pitrou, tarek
Date 2017-01-16.11:20:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1484565622.45.0.536853711645.issue1294959@psf.upfronthosting.co.za>
In-reply-to
Content
Attached is a patch that I'd like to propose for inclusion.

It introduces a new configure option "--with-custom-platlibdir=<name>", which defaults to `basename $libdir`. This is converted to makefile variable "platlibdir", which is used in getpath.c to generate value of the lib_python variable.

sysconfig and distutils.sysconfig retrieve the variable from makefile (i learned about existence of _sysconfigdata so that is where the variable now lives) to correctly substitute in posix_prefix (and unix_prefix for distutils install) scheme.

Sysconfig is then used in pydoc and trace module, instead of locally calculating paths. Perhaps distutils.sysconfig should also use more of sysconfig instead of duplicating the functionality?

As it stands, the python stdlib is installed into /usr/$platlibdir, because I changed SCRIPTDIR to $libdir instead of $prefix/lib. Maybe this should be also separately configurable?
In any case, third-party modules get installed either into /usr/lib or /usr/$platlibdir depending on whether they are arch-independent or not. Hence the final modification in site.py that adds /usr/lib to search path on systems where $platlibdir != "lib".

This caused test_sysconfig to fail because it checks that posix_user and posix_prefix schemes generate "similar" paths. I have left the posix_user scheme alone, so all its paths are based on "lib", where the posix_prefix scheme uses $platlibdir. Maybe posix_user scheme should be modified as well?
Anyway, for now, I have accounted for the changes in the test.

What now?
(please don't make me write a PEP please don't make me write a PEP please don't make......)
History
Date User Action Args
2017-01-16 11:20:22matejciksetrecipients: + matejcik, lemburg, barry, doko, jafo, jcea, belopolsky, pitrou, christian.heimes, tarek, ivazquez, eric.araujo, Arfrever, akitada, andybuckley, catalin.iacob, piotr.dobrogost, cstratak
2017-01-16 11:20:22matejciksetmessageid: <1484565622.45.0.536853711645.issue1294959@psf.upfronthosting.co.za>
2017-01-16 11:20:22matejciklinkissue1294959 messages
2017-01-16 11:20:22matejcikcreate