jan matejek added the comment:

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......)

----------
versions: +Python 3.7
Added file: http://bugs.python.org/file46301/python-3.6.0-multilib-new.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1294959>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to