|
|
70a2d8 |
From b9f1dd6be195cc3b11a80e6f0dde2096dd8b9855 Mon Sep 17 00:00:00 2001
|
|
|
70a2d8 |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
70a2d8 |
Date: Wed, 13 Jan 2010 21:25:18 +0000
|
|
|
70a2d8 |
Subject: [PATCH] 00102: Change the various install paths to use /usr/lib64/
|
|
|
70a2d8 |
instead or /usr/lib/
|
|
|
70a2d8 |
MIME-Version: 1.0
|
|
|
70a2d8 |
Content-Type: text/plain; charset=UTF-8
|
|
|
70a2d8 |
Content-Transfer-Encoding: 8bit
|
|
|
70a2d8 |
|
|
|
70a2d8 |
Only used when "%{_lib}" == "lib64".
|
|
|
70a2d8 |
|
|
|
70a2d8 |
Co-authored-by: David Malcolm <dmalcolm@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Thomas Spura <tomspur@fedoraproject.org>
|
|
|
70a2d8 |
Co-authored-by: Slavek Kabrda <bkabrda@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Tomas Orsava <torsava@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Petr Viktorin <pviktori@redhat.com>
|
|
|
70a2d8 |
Co-authored-by: Miro HronĨok <miro@hroncok.cz>
|
|
|
70a2d8 |
Co-authored-by: Iryna Shcherbina <shcherbina.iryna@gmail.com>
|
|
|
70a2d8 |
---
|
|
|
70a2d8 |
Lib/distutils/command/install.py | 4 ++--
|
|
|
70a2d8 |
Lib/distutils/sysconfig.py | 6 +++++-
|
|
|
70a2d8 |
Lib/distutils/tests/test_install.py | 3 ++-
|
|
|
70a2d8 |
Lib/site.py | 4 ++++
|
|
|
70a2d8 |
Lib/sysconfig.py | 12 ++++++------
|
|
|
70a2d8 |
Lib/test/test_site.py | 4 ++--
|
|
|
70a2d8 |
Makefile.pre.in | 2 +-
|
|
|
70a2d8 |
Modules/getpath.c | 6 +++---
|
|
|
70a2d8 |
configure | 4 ++--
|
|
|
70a2d8 |
configure.ac | 4 ++--
|
|
|
70a2d8 |
setup.py | 6 +++---
|
|
|
70a2d8 |
11 files changed, 32 insertions(+), 23 deletions(-)
|
|
|
70a2d8 |
|
|
|
70a2d8 |
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
|
|
70a2d8 |
index c625c95bf7..ae4f915669 100644
|
|
|
70a2d8 |
--- a/Lib/distutils/command/install.py
|
|
|
70a2d8 |
+++ b/Lib/distutils/command/install.py
|
|
|
70a2d8 |
@@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
|
|
|
70a2d8 |
INSTALL_SCHEMES = {
|
|
|
70a2d8 |
'unix_prefix': {
|
|
|
70a2d8 |
'purelib': '$base/lib/python$py_version_short/site-packages',
|
|
|
70a2d8 |
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
|
|
|
70a2d8 |
+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
|
|
|
70a2d8 |
'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
|
|
|
70a2d8 |
'scripts': '$base/bin',
|
|
|
70a2d8 |
'data' : '$base',
|
|
|
70a2d8 |
},
|
|
|
70a2d8 |
'unix_home': {
|
|
|
70a2d8 |
'purelib': '$base/lib/python',
|
|
|
70a2d8 |
- 'platlib': '$base/lib/python',
|
|
|
70a2d8 |
+ 'platlib': '$base/lib64/python',
|
|
|
70a2d8 |
'headers': '$base/include/python/$dist_name',
|
|
|
70a2d8 |
'scripts': '$base/bin',
|
|
|
70a2d8 |
'data' : '$base',
|
|
|
70a2d8 |
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
|
|
70a2d8 |
index b51629eb94..9a4892a737 100644
|
|
|
70a2d8 |
--- a/Lib/distutils/sysconfig.py
|
|
|
70a2d8 |
+++ b/Lib/distutils/sysconfig.py
|
|
|
70a2d8 |
@@ -146,8 +146,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|
|
70a2d8 |
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
|
|
70a2d8 |
|
|
|
70a2d8 |
if os.name == "posix":
|
|
|
70a2d8 |
+ if plat_specific or standard_lib:
|
|
|
70a2d8 |
+ lib = "lib64"
|
|
|
70a2d8 |
+ else:
|
|
|
70a2d8 |
+ lib = "lib"
|
|
|
70a2d8 |
libpython = os.path.join(prefix,
|
|
|
70a2d8 |
- "lib", "python" + get_python_version())
|
|
|
70a2d8 |
+ lib, "python" + get_python_version())
|
|
|
70a2d8 |
if standard_lib:
|
|
|
70a2d8 |
return libpython
|
|
|
70a2d8 |
else:
|
|
|
70a2d8 |
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
|
|
|
70a2d8 |
index 287ab1989e..d4c05e0ab1 100644
|
|
|
70a2d8 |
--- a/Lib/distutils/tests/test_install.py
|
|
|
70a2d8 |
+++ b/Lib/distutils/tests/test_install.py
|
|
|
70a2d8 |
@@ -57,8 +57,9 @@ class InstallTestCase(support.TempdirManager,
|
|
|
70a2d8 |
self.assertEqual(got, expected)
|
|
|
70a2d8 |
|
|
|
70a2d8 |
libdir = os.path.join(destination, "lib", "python")
|
|
|
70a2d8 |
+ platlibdir = os.path.join(destination, "lib64", "python")
|
|
|
70a2d8 |
check_path(cmd.install_lib, libdir)
|
|
|
70a2d8 |
- check_path(cmd.install_platlib, libdir)
|
|
|
70a2d8 |
+ check_path(cmd.install_platlib, platlibdir)
|
|
|
70a2d8 |
check_path(cmd.install_purelib, libdir)
|
|
|
70a2d8 |
check_path(cmd.install_headers,
|
|
|
70a2d8 |
os.path.join(destination, "include", "python", "foopkg"))
|
|
|
70a2d8 |
diff --git a/Lib/site.py b/Lib/site.py
|
|
|
70a2d8 |
index a065ab0b5d..22d53fa562 100644
|
|
|
70a2d8 |
--- a/Lib/site.py
|
|
|
70a2d8 |
+++ b/Lib/site.py
|
|
|
70a2d8 |
@@ -335,11 +335,15 @@ def getsitepackages(prefixes=None):
|
|
|
70a2d8 |
seen.add(prefix)
|
|
|
70a2d8 |
|
|
|
70a2d8 |
if os.sep == '/':
|
|
|
70a2d8 |
+ sitepackages.append(os.path.join(prefix, "lib64",
|
|
|
70a2d8 |
+ "python" + sys.version[:3],
|
|
|
70a2d8 |
+ "site-packages"))
|
|
|
70a2d8 |
sitepackages.append(os.path.join(prefix, "lib",
|
|
|
70a2d8 |
"python%d.%d" % sys.version_info[:2],
|
|
|
70a2d8 |
"site-packages"))
|
|
|
70a2d8 |
else:
|
|
|
70a2d8 |
sitepackages.append(prefix)
|
|
|
70a2d8 |
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
|
|
70a2d8 |
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
|
|
70a2d8 |
return sitepackages
|
|
|
70a2d8 |
|
|
|
70a2d8 |
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
|
|
70a2d8 |
index b9e2fafbc0..0ae6d35b69 100644
|
|
|
70a2d8 |
--- a/Lib/sysconfig.py
|
|
|
70a2d8 |
+++ b/Lib/sysconfig.py
|
|
|
70a2d8 |
@@ -20,10 +20,10 @@ __all__ = [
|
|
|
70a2d8 |
|
|
|
70a2d8 |
_INSTALL_SCHEMES = {
|
|
|
70a2d8 |
'posix_prefix': {
|
|
|
70a2d8 |
- 'stdlib': '{installed_base}/lib/python{py_version_short}',
|
|
|
70a2d8 |
- 'platstdlib': '{platbase}/lib/python{py_version_short}',
|
|
|
70a2d8 |
+ 'stdlib': '{installed_base}/lib64/python{py_version_short}',
|
|
|
70a2d8 |
+ 'platstdlib': '{platbase}/lib64/python{py_version_short}',
|
|
|
70a2d8 |
'purelib': '{base}/lib/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
- 'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
+ 'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
'include':
|
|
|
70a2d8 |
'{installed_base}/include/python{py_version_short}{abiflags}',
|
|
|
70a2d8 |
'platinclude':
|
|
|
70a2d8 |
@@ -62,10 +62,10 @@ _INSTALL_SCHEMES = {
|
|
|
70a2d8 |
'data': '{userbase}',
|
|
|
70a2d8 |
},
|
|
|
70a2d8 |
'posix_user': {
|
|
|
70a2d8 |
- 'stdlib': '{userbase}/lib/python{py_version_short}',
|
|
|
70a2d8 |
- 'platstdlib': '{userbase}/lib/python{py_version_short}',
|
|
|
70a2d8 |
+ 'stdlib': '{userbase}/lib64/python{py_version_short}',
|
|
|
70a2d8 |
+ 'platstdlib': '{userbase}/lib64/python{py_version_short}',
|
|
|
70a2d8 |
'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
- 'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
+ 'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
|
|
|
70a2d8 |
'include': '{userbase}/include/python{py_version_short}',
|
|
|
70a2d8 |
'scripts': '{userbase}/bin',
|
|
|
70a2d8 |
'data': '{userbase}',
|
|
|
70a2d8 |
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
|
|
70a2d8 |
index 41c4229919..543c88432a 100644
|
|
|
70a2d8 |
--- a/Lib/test/test_site.py
|
|
|
70a2d8 |
+++ b/Lib/test/test_site.py
|
|
|
70a2d8 |
@@ -266,8 +266,8 @@ class HelperFunctionsTests(unittest.TestCase):
|
|
|
70a2d8 |
dirs = site.getsitepackages()
|
|
|
70a2d8 |
if os.sep == '/':
|
|
|
70a2d8 |
# OS X, Linux, FreeBSD, etc
|
|
|
70a2d8 |
- self.assertEqual(len(dirs), 1)
|
|
|
70a2d8 |
- wanted = os.path.join('xoxo', 'lib',
|
|
|
70a2d8 |
+ self.assertEqual(len(dirs), 2)
|
|
|
70a2d8 |
+ wanted = os.path.join('xoxo', 'lib64',
|
|
|
70a2d8 |
'python%d.%d' % sys.version_info[:2],
|
|
|
70a2d8 |
'site-packages')
|
|
|
70a2d8 |
self.assertEqual(dirs[0], wanted)
|
|
|
70a2d8 |
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
|
70a2d8 |
index 502317aa0c..4ad3df1122 100644
|
|
|
70a2d8 |
--- a/Makefile.pre.in
|
|
|
70a2d8 |
+++ b/Makefile.pre.in
|
|
|
70a2d8 |
@@ -143,7 +143,7 @@ LIBDIR= @libdir@
|
|
|
70a2d8 |
MANDIR= @mandir@
|
|
|
70a2d8 |
INCLUDEDIR= @includedir@
|
|
|
70a2d8 |
CONFINCLUDEDIR= $(exec_prefix)/include
|
|
|
70a2d8 |
-SCRIPTDIR= $(prefix)/lib
|
|
|
70a2d8 |
+SCRIPTDIR= $(prefix)/lib64
|
|
|
70a2d8 |
ABIFLAGS= @ABIFLAGS@
|
|
|
70a2d8 |
|
|
|
70a2d8 |
# Detailed destination directories
|
|
|
70a2d8 |
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
|
|
70a2d8 |
index b727f66953..a0c5fb6139 100644
|
|
|
70a2d8 |
--- a/Modules/getpath.c
|
|
|
70a2d8 |
+++ b/Modules/getpath.c
|
|
|
70a2d8 |
@@ -730,7 +730,7 @@ calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,
|
|
|
70a2d8 |
if (safe_wcscpy(exec_prefix, calculate->exec_prefix, exec_prefix_len) < 0) {
|
|
|
70a2d8 |
return PATHLEN_ERR();
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
- status = joinpath(exec_prefix, L"lib/lib-dynload", exec_prefix_len);
|
|
|
70a2d8 |
+ status = joinpath(exec_prefix, L"lib64/lib-dynload", exec_prefix_len);
|
|
|
70a2d8 |
if (_PyStatus_EXCEPTION(status)) {
|
|
|
70a2d8 |
return status;
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
@@ -1067,7 +1067,7 @@ calculate_zip_path(PyCalculatePath *calculate, const wchar_t *prefix,
|
|
|
70a2d8 |
return PATHLEN_ERR();
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
- status = joinpath(zip_path, L"lib/python00.zip", zip_path_len);
|
|
|
70a2d8 |
+ status = joinpath(zip_path, L"lib64/python00.zip", zip_path_len);
|
|
|
70a2d8 |
if (_PyStatus_EXCEPTION(status)) {
|
|
|
70a2d8 |
return status;
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
@@ -1197,7 +1197,7 @@ calculate_init(PyCalculatePath *calculate, const PyConfig *config)
|
|
|
70a2d8 |
if (!calculate->exec_prefix) {
|
|
|
70a2d8 |
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
- calculate->lib_python = Py_DecodeLocale("lib/python" VERSION, &len;;
|
|
|
70a2d8 |
+ calculate->lib_python = Py_DecodeLocale("lib64/python" VERSION, &len;;
|
|
|
70a2d8 |
if (!calculate->lib_python) {
|
|
|
70a2d8 |
return DECODE_LOCALE_ERR("EXEC_PREFIX define", len);
|
|
|
70a2d8 |
}
|
|
|
70a2d8 |
diff --git a/configure b/configure
|
|
|
70a2d8 |
index 2a933cdbeb..bec365124e 100755
|
|
|
70a2d8 |
--- a/configure
|
|
|
70a2d8 |
+++ b/configure
|
|
|
70a2d8 |
@@ -15182,9 +15182,9 @@ fi
|
|
|
70a2d8 |
|
|
|
70a2d8 |
|
|
|
70a2d8 |
if test x$PLATFORM_TRIPLET = x; then
|
|
|
70a2d8 |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
|
|
70a2d8 |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
|
|
|
70a2d8 |
else
|
|
|
70a2d8 |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
70a2d8 |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
70a2d8 |
fi
|
|
|
70a2d8 |
|
|
|
70a2d8 |
|
|
|
70a2d8 |
diff --git a/configure.ac b/configure.ac
|
|
|
70a2d8 |
index a189d42c2c..154a0aa5cc 100644
|
|
|
70a2d8 |
--- a/configure.ac
|
|
|
70a2d8 |
+++ b/configure.ac
|
|
|
70a2d8 |
@@ -4668,9 +4668,9 @@ fi
|
|
|
70a2d8 |
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
|
|
|
70a2d8 |
AC_SUBST(PY_ENABLE_SHARED)
|
|
|
70a2d8 |
if test x$PLATFORM_TRIPLET = x; then
|
|
|
70a2d8 |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
|
|
70a2d8 |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
|
|
|
70a2d8 |
else
|
|
|
70a2d8 |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
70a2d8 |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
70a2d8 |
fi
|
|
|
70a2d8 |
AC_SUBST(LIBPL)
|
|
|
70a2d8 |
|
|
|
70a2d8 |
diff --git a/setup.py b/setup.py
|
|
|
70a2d8 |
index 20d7f35652..024a1035c0 100644
|
|
|
70a2d8 |
--- a/setup.py
|
|
|
70a2d8 |
+++ b/setup.py
|
|
|
70a2d8 |
@@ -649,7 +649,7 @@ class PyBuildExt(build_ext):
|
|
|
70a2d8 |
# directories (i.e. '.' and 'Include') must be first. See issue
|
|
|
70a2d8 |
# 10520.
|
|
|
70a2d8 |
if not CROSS_COMPILING:
|
|
|
70a2d8 |
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
|
|
70a2d8 |
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
|
|
|
70a2d8 |
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
|
|
70a2d8 |
# only change this for cross builds for 3.3, issues on Mageia
|
|
|
70a2d8 |
if CROSS_COMPILING:
|
|
|
70a2d8 |
@@ -953,11 +953,11 @@ class PyBuildExt(build_ext):
|
|
|
70a2d8 |
elif curses_library:
|
|
|
70a2d8 |
readline_libs.append(curses_library)
|
|
|
70a2d8 |
elif self.compiler.find_library_file(self.lib_dirs +
|
|
|
70a2d8 |
- ['/usr/lib/termcap'],
|
|
|
70a2d8 |
+ ['/usr/lib64/termcap'],
|
|
|
70a2d8 |
'termcap'):
|
|
|
70a2d8 |
readline_libs.append('termcap')
|
|
|
70a2d8 |
self.add(Extension('readline', ['readline.c'],
|
|
|
70a2d8 |
- library_dirs=['/usr/lib/termcap'],
|
|
|
70a2d8 |
+ library_dirs=['/usr/lib64/termcap'],
|
|
|
70a2d8 |
extra_link_args=readline_extra_link_args,
|
|
|
70a2d8 |
libraries=readline_libs))
|
|
|
70a2d8 |
else:
|
|
|
70a2d8 |
--
|
|
|
70a2d8 |
2.21.0
|
|
|
70a2d8 |
|