python37/python3-3.7.4-lib64.patch

154 lines
7.1 KiB
Diff

diff -ru Python-3.7.4.orig/Lib/distutils/command/install.py Python-3.7.4/Lib/distutils/command/install.py
--- Python-3.7.4.orig/Lib/distutils/command/install.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Lib/distutils/command/install.py 2019-08-28 15:52:48.373000000 +0200
@@ -30,14 +30,14 @@
INSTALL_SCHEMES = {
'unix_prefix': {
'purelib': '$base/lib/python$py_version_short/site-packages',
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
},
'unix_home': {
'purelib': '$base/lib/python',
- 'platlib': '$base/lib/python',
+ 'platlib': '$base/lib64/python',
'headers': '$base/include/python/$dist_name',
'scripts': '$base/bin',
'data' : '$base',
diff -ru Python-3.7.4.orig/Lib/distutils/sysconfig.py Python-3.7.4/Lib/distutils/sysconfig.py
--- Python-3.7.4.orig/Lib/distutils/sysconfig.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Lib/distutils/sysconfig.py 2019-08-28 15:52:48.377000000 +0200
@@ -147,8 +147,12 @@
prefix = plat_specific and EXEC_PREFIX or PREFIX
if os.name == "posix":
+ if plat_specific or standard_lib:
+ lib = "lib64"
+ else:
+ lib = "lib"
libpython = os.path.join(prefix,
- "lib", "python" + get_python_version())
+ lib, "python" + get_python_version())
if standard_lib:
return libpython
else:
diff -ru Python-3.7.4.orig/Lib/site.py Python-3.7.4/Lib/site.py
--- Python-3.7.4.orig/Lib/site.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Lib/site.py 2019-08-28 15:54:01.948000000 +0200
@@ -334,11 +334,15 @@
seen.add(prefix)
if os.sep == '/':
+ sitepackages.append(os.path.join(prefix, "lib64",
+ "python%d.%d" % sys.version_info[:2],
+ "site-packages"))
sitepackages.append(os.path.join(prefix, "lib",
"python%d.%d" % sys.version_info[:2],
"site-packages"))
else:
sitepackages.append(prefix)
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
return sitepackages
diff -ru Python-3.7.4.orig/Lib/sysconfig.py Python-3.7.4/Lib/sysconfig.py
--- Python-3.7.4.orig/Lib/sysconfig.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Lib/sysconfig.py 2019-08-28 15:52:48.380000000 +0200
@@ -20,10 +20,10 @@
_INSTALL_SCHEMES = {
'posix_prefix': {
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
'purelib': '{base}/lib/python{py_version_short}/site-packages',
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
'include':
'{installed_base}/include/python{py_version_short}{abiflags}',
'platinclude':
@@ -62,10 +62,10 @@
'data': '{userbase}',
},
'posix_user': {
- 'stdlib': '{userbase}/lib/python{py_version_short}',
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
'include': '{userbase}/include/python{py_version_short}',
'scripts': '{userbase}/bin',
'data': '{userbase}',
diff -ru Python-3.7.4.orig/Lib/test/test_site.py Python-3.7.4/Lib/test/test_site.py
--- Python-3.7.4.orig/Lib/test/test_site.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Lib/test/test_site.py 2019-08-28 15:52:48.380000000 +0200
@@ -270,7 +270,7 @@
if os.sep == '/':
# OS X, Linux, FreeBSD, etc
self.assertEqual(len(dirs), 1)
- wanted = os.path.join('xoxo', 'lib',
+ wanted = os.path.join('xoxo', 'lib64',
'python%d.%d' % sys.version_info[:2],
'site-packages')
self.assertEqual(dirs[0], wanted)
@@ -278,7 +278,7 @@
# other platforms
self.assertEqual(len(dirs), 2)
self.assertEqual(dirs[0], 'xoxo')
- wanted = os.path.join('xoxo', 'lib', 'site-packages')
+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
self.assertEqual(dirs[1], wanted)
def test_no_home_directory(self):
diff -ru Python-3.7.4.orig/Makefile.pre.in Python-3.7.4/Makefile.pre.in
--- Python-3.7.4.orig/Makefile.pre.in 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Makefile.pre.in 2019-08-28 15:52:48.381000000 +0200
@@ -144,7 +144,7 @@
MANDIR= @mandir@
INCLUDEDIR= @includedir@
CONFINCLUDEDIR= $(exec_prefix)/include
-SCRIPTDIR= $(prefix)/lib
+SCRIPTDIR= $(prefix)/lib64
ABIFLAGS= @ABIFLAGS@
# Detailed destination directories
diff -ru Python-3.7.4.orig/Modules/getpath.c Python-3.7.4/Modules/getpath.c
--- Python-3.7.4.orig/Modules/getpath.c 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/Modules/getpath.c 2019-08-28 15:52:48.382000000 +0200
@@ -787,7 +787,7 @@
else {
wcsncpy(calculate->zip_path, calculate->prefix, MAXPATHLEN);
}
- joinpath(calculate->zip_path, L"lib/python00.zip");
+ joinpath(calculate->zip_path, L"lib64/python00.zip");
/* Replace "00" with version */
size_t bufsz = wcslen(calculate->zip_path);
@@ -912,7 +912,7 @@
if (!calculate->prefix) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len);
+ calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len);
if (!calculate->lib_python) {
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
}
diff -ru Python-3.7.4.orig/setup.py Python-3.7.4/setup.py
--- Python-3.7.4.orig/setup.py 2019-07-08 20:03:50.000000000 +0200
+++ Python-3.7.4/setup.py 2019-08-28 15:52:48.384000000 +0200
@@ -585,7 +585,7 @@
# directories (i.e. '.' and 'Include') must be first. See issue
# 10520.
if not cross_compiling:
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
# only change this for cross builds for 3.3, issues on Mageia
if cross_compiling: