bpo-1294959: Add sys.platlibdir attribute (GH-18381)

Add --with-platlibdir option to the configure script: name of the
platform-specific library directory, stored in the new sys.platlitdir
attribute. It is used to build the path of platform-specific dynamic
libraries and the path of the standard library.

It is equal to "lib" on most platforms. On Fedora and SuSE, it is
equal to "lib64" on 64-bit systems.

Co-Authored-By: Jan Matějek <jmatejek@suse.com>
Co-Authored-By: Matěj Cepl <mcepl@cepl.eu>
Co-Authored-By: Charalampos Stratakis <cstratak@redhat.com>
This commit is contained in:
Victor Stinner 2020-03-10 09:53:09 +01:00 committed by GitHub
parent 700cb58730
commit 8510f43078
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 210 additions and 54 deletions

View file

@ -1068,11 +1068,11 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
else:
ver = sys.version_info
return [
os.path.join(prefix, 'lib',
os.path.join(prefix, sys.platlibdir,
f'python{ver.major}{ver.minor}.zip'),
os.path.join(prefix, 'lib',
os.path.join(prefix, sys.platlibdir,
f'python{ver.major}.{ver.minor}'),
os.path.join(exec_prefix, 'lib',
os.path.join(exec_prefix, sys.platlibdir,
f'python{ver.major}.{ver.minor}', 'lib-dynload'),
]
@ -1183,7 +1183,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
if not MS_WINDOWS:
lib_dynload = os.path.join(pyvenv_home,
'lib',
sys.platlibdir,
f'python{ver.major}.{ver.minor}',
'lib-dynload')
os.makedirs(lib_dynload)