|
|
5f55304 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
869be1a |
From: David Malcolm <dmalcolm@redhat.com>
|
|
|
869be1a |
Date: Wed, 13 Jan 2010 21:25:18 +0000
|
|
|
869be1a |
Subject: [PATCH] 00102: Change the various install paths to use /usr/lib64/
|
|
|
869be1a |
instead or /usr/lib/
|
|
|
869be1a |
MIME-Version: 1.0
|
|
|
869be1a |
Content-Type: text/plain; charset=UTF-8
|
|
|
869be1a |
Content-Transfer-Encoding: 8bit
|
|
|
869be1a |
|
|
|
869be1a |
Only used when "%{_lib}" == "lib64".
|
|
|
869be1a |
|
|
|
869be1a |
Co-authored-by: David Malcolm <dmalcolm@redhat.com>
|
|
|
869be1a |
Co-authored-by: Thomas Spura <tomspur@fedoraproject.org>
|
|
|
869be1a |
Co-authored-by: Slavek Kabrda <bkabrda@redhat.com>
|
|
|
869be1a |
Co-authored-by: Matej Stuchlik <mstuchli@redhat.com>
|
|
|
869be1a |
Co-authored-by: Tomas Orsava <torsava@redhat.com>
|
|
|
869be1a |
Co-authored-by: Charalampos Stratakis <cstratak@redhat.com>
|
|
|
869be1a |
Co-authored-by: Petr Viktorin <pviktori@redhat.com>
|
|
|
869be1a |
Co-authored-by: Miro HronĨok <miro@hroncok.cz>
|
|
|
869be1a |
Co-authored-by: Iryna Shcherbina <shcherbina.iryna@gmail.com>
|
|
|
869be1a |
---
|
|
|
869be1a |
Lib/distutils/command/install.py | 4 ++--
|
|
|
869be1a |
Lib/distutils/sysconfig.py | 6 +++++-
|
|
|
869be1a |
Lib/distutils/tests/test_install.py | 3 ++-
|
|
|
869be1a |
Lib/site.py | 4 ++++
|
|
|
869be1a |
Lib/sysconfig.py | 12 ++++++------
|
|
|
869be1a |
Lib/test/test_site.py | 4 ++--
|
|
|
869be1a |
Makefile.pre.in | 2 +-
|
|
|
869be1a |
Modules/getpath.c | 6 +++---
|
|
|
869be1a |
configure.ac | 4 ++--
|
|
|
869be1a |
setup.py | 10 +++++-----
|
|
|
869be1a |
10 files changed, 32 insertions(+), 23 deletions(-)
|
|
|
869be1a |
|
|
|
6cd1c5f |
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
|
|
869be1a |
index 0258d3deae..4b969bf809 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
|
|
|
869be1a |
index 2bcd1dd288..ff0b131df2 100644
|
|
|
6cd1c5f |
--- a/Lib/distutils/sysconfig.py
|
|
|
6cd1c5f |
+++ b/Lib/distutils/sysconfig.py
|
|
|
869be1a |
@@ -129,8 +129,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:
|
|
|
869be1a |
diff --git a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
|
|
|
869be1a |
index 287ab1989e..d4c05e0ab1 100644
|
|
|
2c6abcc |
--- a/Lib/distutils/tests/test_install.py
|
|
|
2c6abcc |
+++ b/Lib/distutils/tests/test_install.py
|
|
|
869be1a |
@@ -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
|
|
|
869be1a |
index 86ca2dba61..58115f1c08 100644
|
|
|
6cd1c5f |
--- a/Lib/site.py
|
|
|
6cd1c5f |
+++ b/Lib/site.py
|
|
|
869be1a |
@@ -304,11 +304,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"))
|
|
|
5080ffc |
if sys.platform == "darwin":
|
|
|
5080ffc |
# for framework builds *only* we add the standard Apple
|
|
|
6cd1c5f |
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
|
|
|
869be1a |
index 9314e71a2f..8168e9c5a9 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':
|
|
|
6cd1c5f |
@@ -61,10 +61,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
|
|
|
869be1a |
index 6964a84933..d0cd84f1ae 100644
|
|
|
6cd1c5f |
--- a/Lib/test/test_site.py
|
|
|
6cd1c5f |
+++ b/Lib/test/test_site.py
|
|
|
869be1a |
@@ -264,8 +264,8 @@ class HelperFunctionsTests(unittest.TestCase):
|
|
Matej Stuchlik |
abb2ff8 |
self.assertEqual(dirs[1], wanted)
|
|
|
5080ffc |
elif os.sep == '/':
|
|
|
9a2e4be |
# OS X non-framework builds, 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
|
|
|
869be1a |
index d15d93509d..9cd482fc38 100644
|
|
|
6cd1c5f |
--- a/Makefile.pre.in
|
|
|
6cd1c5f |
+++ b/Makefile.pre.in
|
|
|
869be1a |
@@ -139,7 +139,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
|
|
|
869be1a |
index dd3387a9d7..1258fcd395 100644
|
|
|
6cd1c5f |
--- a/Modules/getpath.c
|
|
|
6cd1c5f |
+++ b/Modules/getpath.c
|
|
|
6cd1c5f |
@@ -494,7 +494,7 @@ calculate_path(void)
|
|
Matej Stuchlik |
abb2ff8 |
_pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
|
|
Matej Stuchlik |
abb2ff8 |
_prefix = Py_DecodeLocale(PREFIX, NULL);
|
|
Matej Stuchlik |
abb2ff8 |
_exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
|
|
Matej Stuchlik |
abb2ff8 |
- lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
|
|
Matej Stuchlik |
abb2ff8 |
+ lib_python = Py_DecodeLocale("lib64/python" VERSION, NULL);
|
|
|
5080ffc |
|
|
|
bf35167 |
if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
|
|
|
bf35167 |
Py_FatalError(
|
|
|
6cd1c5f |
@@ -683,7 +683,7 @@ calculate_path(void)
|
|
|
5080ffc |
}
|
|
|
5080ffc |
else
|
|
|
5080ffc |
wcsncpy(zip_path, _prefix, MAXPATHLEN);
|
|
|
5080ffc |
- joinpath(zip_path, L"lib/python00.zip");
|
|
|
5080ffc |
+ joinpath(zip_path, L"lib64/python00.zip");
|
|
|
5080ffc |
bufsz = wcslen(zip_path); /* Replace "00" with version */
|
|
|
5080ffc |
zip_path[bufsz - 6] = VERSION[0];
|
|
|
5080ffc |
zip_path[bufsz - 5] = VERSION[2];
|
|
|
6cd1c5f |
@@ -695,7 +695,7 @@ calculate_path(void)
|
|
|
5080ffc |
fprintf(stderr,
|
|
|
5080ffc |
"Could not find platform dependent libraries <exec_prefix>\n");
|
|
|
5080ffc |
wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
|
|
|
5080ffc |
- joinpath(exec_prefix, L"lib/lib-dynload");
|
|
|
5080ffc |
+ joinpath(exec_prefix, L"lib64/lib-dynload");
|
|
|
5080ffc |
}
|
|
|
5080ffc |
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
|
|
5080ffc |
|
|
|
869be1a |
diff --git a/configure.ac b/configure.ac
|
|
|
869be1a |
index cf280506bd..7bf4c6fb4c 100644
|
|
|
869be1a |
--- a/configure.ac
|
|
|
869be1a |
+++ b/configure.ac
|
|
|
869be1a |
@@ -4771,9 +4771,9 @@ AC_MSG_RESULT($LDVERSION)
|
|
|
869be1a |
dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
|
|
|
869be1a |
AC_SUBST(PY_ENABLE_SHARED)
|
|
|
869be1a |
if test x$PLATFORM_TRIPLET = x; then
|
|
|
869be1a |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
|
|
|
869be1a |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
|
|
|
869be1a |
else
|
|
|
869be1a |
- LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
869be1a |
+ LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}-${PLATFORM_TRIPLET}"
|
|
|
869be1a |
fi
|
|
|
869be1a |
AC_SUBST(LIBPL)
|
|
|
869be1a |
|
|
|
6cd1c5f |
diff --git a/setup.py b/setup.py
|
|
|
869be1a |
index e2c1898253..64d948d79c 100644
|
|
|
6cd1c5f |
--- a/setup.py
|
|
|
6cd1c5f |
+++ b/setup.py
|
|
|
869be1a |
@@ -521,7 +521,7 @@ class PyBuildExt(build_ext):
|
|
|
5080ffc |
# directories (i.e. '.' and 'Include') must be first. See issue
|
|
|
5080ffc |
# 10520.
|
|
|
62d7207 |
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
|
|
|
62d7207 |
if cross_compiling:
|
|
|
869be1a |
@@ -818,11 +818,11 @@ class PyBuildExt(build_ext):
|
|
|
5080ffc |
elif curses_library:
|
|
|
5080ffc |
readline_libs.append(curses_library)
|
|
|
5080ffc |
elif self.compiler.find_library_file(lib_dirs +
|
|
|
5080ffc |
- ['/usr/lib/termcap'],
|
|
|
5080ffc |
+ ['/usr/lib64/termcap'],
|
|
|
5080ffc |
'termcap'):
|
|
|
5080ffc |
readline_libs.append('termcap')
|
|
|
5080ffc |
exts.append( Extension('readline', ['readline.c'],
|
|
|
5080ffc |
- library_dirs=['/usr/lib/termcap'],
|
|
|
5080ffc |
+ library_dirs=['/usr/lib64/termcap'],
|
|
|
5080ffc |
extra_link_args=readline_extra_link_args,
|
|
|
5080ffc |
libraries=readline_libs) )
|
|
|
5080ffc |
else:
|
|
|
869be1a |
@@ -859,8 +859,8 @@ class PyBuildExt(build_ext):
|
|
|
5080ffc |
if krb5_h:
|
|
|
5080ffc |
ssl_incs += krb5_h
|
|
|
5080ffc |
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
|
|
5080ffc |
- ['/usr/local/ssl/lib',
|
|
|
5080ffc |
- '/usr/contrib/ssl/lib/'
|
|
|
5080ffc |
+ ['/usr/local/ssl/lib64',
|
|
|
5080ffc |
+ '/usr/contrib/ssl/lib64/'
|
|
|
5080ffc |
] )
|
|
|
5080ffc |
|
|
|
5080ffc |
if (ssl_incs is not None and
|