|
|
285f554 |
From 972d1ce207285b7b29407b95ea6519c289c71d89 Mon Sep 17 00:00:00 2001
|
|
|
285f554 |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
285f554 |
Date: Wed, 13 Jan 2010 21:25:18 +0000
|
|
|
285f554 |
Subject: [PATCH 2/9] 00102: Change the various install paths to use
|
|
|
285f554 |
/usr/lib64/ instead or /usr/lib/
|
|
|
285f554 |
MIME-Version: 1.0
|
|
|
285f554 |
Content-Type: text/plain; charset=UTF-8
|
|
|
285f554 |
Content-Transfer-Encoding: 8bit
|
|
|
285f554 |
|
|
|
285f554 |
Only used when "%{_lib}" == "lib64".
|
|
|
285f554 |
|
|
|
285f554 |
Co-authored-by: David Malcolm <dmalcolm@redhat.com>
|
|
|
285f554 |
Co-authored-by: Thomas Spura <tomspur@fedoraproject.org>
|
|
|
285f554 |
Co-authored-by: Slavek Kabrda <bkabrda@redhat.com>
|
|
|
285f554 |
Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
|
|
|
285f554 |
Co-authored-by: Tomas Orsava <torsava@redhat.com>
|
|
|
285f554 |
Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
|
|
|
285f554 |
Co-authored-by: Petr Viktorin <pviktori@redhat.com>
|
|
|
285f554 |
Co-authored-by: Miro HronĨok <miro@hroncok.cz>
|
|
|
285f554 |
Co-authored-by: Iryna Shcherbina <shcherbina.iryna@gmail.com>
|
|
|
285f554 |
---
|
|
|
285f554 |
Lib/distutils/command/install.py | 4 ++--
|
|
|
285f554 |
Lib/distutils/sysconfig.py | 6 +++++-
|
|
|
285f554 |
Lib/distutils/tests/test_install.py | 3 ++-
|
|
|
285f554 |
Lib/site.py | 4 ++++
|
|
|
285f554 |
Lib/sysconfig.py | 12 ++++++------
|
|
|
285f554 |
Lib/test/test_site.py | 4 ++--
|
|
|
285f554 |
Makefile.pre.in | 2 +-
|
|
|
285f554 |
Modules/getpath.c | 6 +++---
|
|
|
285f554 |
setup.py | 6 +++---
|
|
|
285f554 |
9 files changed, 28 insertions(+), 19 deletions(-)
|
|
|
285f554 |
|
|
|
6cd1c5f |
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
|
|
285f554 |
index c625c95bf7..ae4f915669 100644
|
|
|
6cd1c5f |
--- a/Lib/distutils/command/install.py
|
|
|
6cd1c5f |
+++ b/Lib/distutils/command/install.py
|
|
|
6cd1c5f |
@@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
|
|
|
5080ffc |
INSTALL_SCHEMES = {
|
|
|
5080ffc |
'unix_prefix': {
|
|
|
5080ffc |
'purelib': '$base/lib/python$py_version_short/site-packages',
|
|
|
5080ffc |
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
|
|
|
5080ffc |
+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
|
|
|
5080ffc |
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
|
|
|
5080ffc |
'scripts': '$base/bin',
|
|
|
5080ffc |
'data' : '$base',
|
|
|
5080ffc |
},
|
|
|
5080ffc |
'unix_home': {
|
|
|
5080ffc |
'purelib': '$base/lib/python',
|
|
|
5080ffc |
- 'platlib': '$base/lib/python',
|
|
|
5080ffc |
+ 'platlib': '$base/lib64/python',
|
|
|
5080ffc |
'headers': '$base/include/python/$dist_name',
|
|
|
5080ffc |
'scripts': '$base/bin',
|
|
|
5080ffc |
'data' : '$base',
|
|
|
6cd1c5f |
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
|
|
285f554 |
index b51629eb94..9a4892a737 100644
|
|
|
6cd1c5f |
--- a/Lib/distutils/sysconfig.py
|
|
|
6cd1c5f |
+++ b/Lib/distutils/sysconfig.py
|
|
|
285f554 |
@@ -146,8 +146,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|
|
1c94c1a |
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
|
|
5080ffc |
|
|
|
5080ffc |
if os.name == "posix":
|
|
|
5080ffc |
+ if plat_specific or standard_lib:
|
|
|
5080ffc |
+ lib = "lib64"
|
|
|
5080ffc |
+ else:
|
|
|
5080ffc |
+ lib = "lib"
|
|
|
5080ffc |
libpython = os.path.join(prefix,
|
|
|
5080ffc |
- "lib", "python" + get_python_version())
|
|
|
5080ffc |
+ lib, "python" + get_python_version())
|
|
|
5080ffc |
if standard_lib:
|
|
|
5080ffc |
return libpython
|
|
|
5080ffc |
else:
|
|
|
d668c1e |
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
|
|
|
285f554 |
index 287ab1989e..d4c05e0ab1 100644
|
|
|
2c6abcc |
--- a/Lib/distutils/tests/test_install.py
|
|
|
2c6abcc |
+++ b/Lib/distutils/tests/test_install.py
|
|
|
d668c1e |
@@ -57,8 +57,9 @@ class InstallTestCase(support.TempdirManager,
|
|
|
2c6abcc |
self.assertEqual(got, expected)
|
|
|
2c6abcc |
|
|
|
2c6abcc |
libdir = os.path.join(destination, "lib", "python")
|
|
|
2c6abcc |
+ platlibdir = os.path.join(destination, "lib64", "python")
|
|
|
2c6abcc |
check_path(cmd.install_lib, libdir)
|
|
|
2c6abcc |
- check_path(cmd.install_platlib, libdir)
|
|
|
2c6abcc |
+ check_path(cmd.install_platlib, platlibdir)
|
|
|
2c6abcc |
check_path(cmd.install_purelib, libdir)
|
|
|
2c6abcc |
check_path(cmd.install_headers,
|
|
|
2c6abcc |
os.path.join(destination, "include", "python", "foopkg"))
|
|
|
6cd1c5f |
diff --git a/Lib/site.py b/Lib/site.py
|
|
|
285f554 |
index ad1146332b..99149a564f 100644
|
|
|
6cd1c5f |
--- a/Lib/site.py
|
|
|
6cd1c5f |
+++ b/Lib/site.py
|
|
|
d668c1e |
@@ -334,11 +334,15 @@ def getsitepackages(prefixes=None):
|
|
|
f5250ec |
seen.add(prefix)
|
|
|
bf35167 |
|
|
|
f5250ec |
if os.sep == '/':
|
|
|
5080ffc |
+ sitepackages.append(os.path.join(prefix, "lib64",
|
|
|
5080ffc |
+ "python" + sys.version[:3],
|
|
|
5080ffc |
+ "site-packages"))
|
|
|
5080ffc |
sitepackages.append(os.path.join(prefix, "lib",
|
|
|
0424a4f |
"python%d.%d" % sys.version_info[:2],
|
|
|
5080ffc |
"site-packages"))
|
|
|
5080ffc |
else:
|
|
|
5080ffc |
sitepackages.append(prefix)
|
|
|
5080ffc |
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
|
|
5080ffc |
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
|
|
cea6d60 |
return sitepackages
|
|
|
cea6d60 |
|
|
|
6cd1c5f |
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
|
|
285f554 |
index 8446c8deb2..cf64d79c4d 100644
|
|
|
6cd1c5f |
--- a/Lib/sysconfig.py
|
|
|
6cd1c5f |
+++ b/Lib/sysconfig.py
|
|
|
6cd1c5f |
@@ -20,10 +20,10 @@ __all__ = [
|
|
|
5080ffc |
|
|
|
5080ffc |
_INSTALL_SCHEMES = {
|
|
|
5080ffc |
'posix_prefix': {
|
|
|
1c94c1a |
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
|
|
|
5080ffc |
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
|
|
1c94c1a |
+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
|
|
|
5080ffc |
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
|
|
|
5080ffc |
'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
|
|
5080ffc |
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
|
|
|
5080ffc |
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
|
|
|
5080ffc |
'include':
|
|
|
1c94c1a |
'{installed_base}/include/python{py_version_short}{abiflags}',
|
|
|
5080ffc |
'platinclude':
|
|
|
d668c1e |
@@ -62,10 +62,10 @@ _INSTALL_SCHEMES = {
|
|
|
1c94c1a |
'data': '{userbase}',
|
|
|
5080ffc |
},
|
|
|
5080ffc |
'posix_user': {
|
|
|
5080ffc |
- 'stdlib': '{userbase}/lib/python{py_version_short}',
|
|
|
5080ffc |
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
|
|
|
5080ffc |
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
|
|
|
5080ffc |
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
|
|
|
5080ffc |
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
|
|
5080ffc |
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
|
|
5080ffc |
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
|
|
|
5080ffc |
'include': '{userbase}/include/python{py_version_short}',
|
|
|
5080ffc |
'scripts': '{userbase}/bin',
|
|
|
1c94c1a |
'data': '{userbase}',
|
|
|
6cd1c5f |
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
|
|
285f554 |
index 41c4229919..543c88432a 100644
|
|
|
6cd1c5f |
--- a/Lib/test/test_site.py
|
|
|
6cd1c5f |
+++ b/Lib/test/test_site.py
|
|
|
804ec7c |
@@ -266,8 +266,8 @@ class HelperFunctionsTests(unittest.TestCase):
|
|
|
cea6d60 |
dirs = site.getsitepackages()
|
|
|
cea6d60 |
if os.sep == '/':
|
|
|
cea6d60 |
# OS X, Linux, FreeBSD, etc
|
|
Matej Stuchlik |
abb2ff8 |
- self.assertEqual(len(dirs), 1)
|
|
|
0424a4f |
- wanted = os.path.join('xoxo', 'lib',
|
|
Matej Stuchlik |
abb2ff8 |
+ self.assertEqual(len(dirs), 2)
|
|
|
0424a4f |
+ wanted = os.path.join('xoxo', 'lib64',
|
|
|
0424a4f |
'python%d.%d' % sys.version_info[:2],
|
|
|
5080ffc |
'site-packages')
|
|
|
5080ffc |
self.assertEqual(dirs[0], wanted)
|
|
|
6cd1c5f |
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
|
285f554 |
index 75eb66be3c..f1e21784af 100644
|
|
|
6cd1c5f |
--- a/Makefile.pre.in
|
|
|
6cd1c5f |
+++ b/Makefile.pre.in
|
|
|
285f554 |
@@ -143,7 +143,7 @@ LIBDIR= @libdir@
|
|
|
5080ffc |
MANDIR= @mandir@
|
|
|
5080ffc |
INCLUDEDIR= @includedir@
|
|
|
5080ffc |
CONFINCLUDEDIR= $(exec_prefix)/include
|
|
|
5080ffc |
-SCRIPTDIR= $(prefix)/lib
|
|
|
5080ffc |
+SCRIPTDIR= $(prefix)/lib64
|
|
|
5080ffc |
ABIFLAGS= @ABIFLAGS@
|
|
|
5080ffc |
|
|
|
5080ffc |
# Detailed destination directories
|
|
|
6cd1c5f |
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
|
|
285f554 |
index 3991ad719c..1baf8a2ff4 100644
|
|
|
6cd1c5f |
--- a/Modules/getpath.c
|
|
|
6cd1c5f |
+++ b/Modules/getpath.c
|
|
|
804ec7c |
@@ -688,7 +688,7 @@ calculate_exec_prefix(const _PyCoreConfig *core_config,
|
|
|
804ec7c |
if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) {
|
|
|
804ec7c |
return PATHLEN_ERR();
|
|
|
804ec7c |
}
|
|
|
804ec7c |
- err = joinpath(exec_prefix, L"lib/lib-dynload", exec_prefix_len);
|
|
|
804ec7c |
+ err = joinpath(exec_prefix, L"lib64/lib-dynload", exec_prefix_len);
|
|
|
804ec7c |
if (_Py_INIT_FAILED(err)) {
|
|
|
804ec7c |
return err;
|
|
|
804ec7c |
}
|
|
|
804ec7c |
@@ -1015,7 +1015,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix)
|
|
|
804ec7c |
return PATHLEN_ERR();
|
|
|
c9349a7 |
}
|
|
|
5080ffc |
}
|
|
|
804ec7c |
- err = joinpath(calculate->zip_path, L"lib/python00.zip", zip_path_len);
|
|
|
804ec7c |
+ err = joinpath(calculate->zip_path, L"lib64/python00.zip", zip_path_len);
|
|
|
804ec7c |
if (_Py_INIT_FAILED(err)) {
|
|
|
804ec7c |
return err;
|
|
|
c9349a7 |
}
|
|
|
804ec7c |
@@ -1144,7 +1144,7 @@ calculate_init(PyCalculatePath *calculate,
|
|
|
c9349a7 |
if (!calculate->prefix) {
|
|
|
c9349a7 |
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
|
|
|
c9349a7 |
}
|
|
|
c9349a7 |
- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len;;
|
|
|
c9349a7 |
+ calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len;;
|
|
|
c9349a7 |
if (!calculate->lib_python) {
|
|
|
c9349a7 |
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
|
|
|
c9349a7 |
}
|
|
|
6cd1c5f |
diff --git a/setup.py b/setup.py
|
|
|
285f554 |
index 96a49b4e35..64420838af 100644
|
|
|
6cd1c5f |
--- a/setup.py
|
|
|
6cd1c5f |
+++ b/setup.py
|
|
|
804ec7c |
@@ -610,7 +610,7 @@ class PyBuildExt(build_ext):
|
|
|
5080ffc |
# directories (i.e. '.' and 'Include') must be first. See issue
|
|
|
5080ffc |
# 10520.
|
|
|
804ec7c |
if not CROSS_COMPILING:
|
|
|
62d7207 |
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
|
|
62d7207 |
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
|
|
|
62d7207 |
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
|
|
62d7207 |
# only change this for cross builds for 3.3, issues on Mageia
|
|
|
804ec7c |
if CROSS_COMPILING:
|
|
|
285f554 |
@@ -906,11 +906,11 @@ class PyBuildExt(build_ext):
|
|
|
5080ffc |
elif curses_library:
|
|
|
5080ffc |
readline_libs.append(curses_library)
|
|
|
804ec7c |
elif self.compiler.find_library_file(self.lib_dirs +
|
|
|
5080ffc |
- ['/usr/lib/termcap'],
|
|
|
5080ffc |
+ ['/usr/lib64/termcap'],
|
|
|
5080ffc |
'termcap'):
|
|
|
5080ffc |
readline_libs.append('termcap')
|
|
|
804ec7c |
self.add(Extension('readline', ['readline.c'],
|
|
|
804ec7c |
- library_dirs=['/usr/lib/termcap'],
|
|
|
804ec7c |
+ library_dirs=['/usr/lib64/termcap'],
|
|
|
804ec7c |
extra_link_args=readline_extra_link_args,
|
|
|
804ec7c |
libraries=readline_libs))
|
|
|
5080ffc |
else:
|
|
|
285f554 |
--
|
|
|
285f554 |
2.21.0
|
|
|
285f554 |
|