|
|
f992f7 |
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
|
|
|
f992f7 |
index b9f1c6c..7b23714 100644
|
|
|
f992f7 |
--- a/Lib/distutils/command/install.py
|
|
|
f992f7 |
+++ b/Lib/distutils/command/install.py
|
|
|
23b3e9 |
@@ -42,14 +42,14 @@ else:
|
|
|
23b3e9 |
INSTALL_SCHEMES = {
|
|
|
23b3e9 |
'unix_prefix': {
|
|
|
23b3e9 |
'purelib': '$base/lib/python$py_version_short/site-packages',
|
|
|
23b3e9 |
- 'platlib': '$platbase/lib/python$py_version_short/site-packages',
|
|
|
23b3e9 |
+ 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
|
|
|
23b3e9 |
'headers': '$base/include/python$py_version_short/$dist_name',
|
|
|
23b3e9 |
'scripts': '$base/bin',
|
|
|
23b3e9 |
'data' : '$base',
|
|
|
23b3e9 |
},
|
|
|
23b3e9 |
'unix_home': {
|
|
|
23b3e9 |
'purelib': '$base/lib/python',
|
|
|
23b3e9 |
- 'platlib': '$base/lib/python',
|
|
|
23b3e9 |
+ 'platlib': '$base/lib64/python',
|
|
|
23b3e9 |
'headers': '$base/include/python/$dist_name',
|
|
|
23b3e9 |
'scripts': '$base/bin',
|
|
|
23b3e9 |
'data' : '$base',
|
|
|
f992f7 |
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
|
|
|
b54164 |
index 031f809..ec5d584 100644
|
|
|
f992f7 |
--- a/Lib/distutils/sysconfig.py
|
|
|
f992f7 |
+++ b/Lib/distutils/sysconfig.py
|
|
|
b54164 |
@@ -120,8 +120,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
|
|
|
23b3e9 |
prefix = plat_specific and EXEC_PREFIX or PREFIX
|
|
|
23b3e9 |
|
|
|
23b3e9 |
if os.name == "posix":
|
|
|
23b3e9 |
+ if plat_specific or standard_lib:
|
|
|
23b3e9 |
+ lib = "lib64"
|
|
|
23b3e9 |
+ else:
|
|
|
23b3e9 |
+ lib = "lib"
|
|
|
23b3e9 |
libpython = os.path.join(prefix,
|
|
|
23b3e9 |
- "lib", "python" + get_python_version())
|
|
|
23b3e9 |
+ lib, "python" + get_python_version())
|
|
|
23b3e9 |
if standard_lib:
|
|
|
23b3e9 |
return libpython
|
|
|
23b3e9 |
else:
|
|
|
f992f7 |
diff --git a/Lib/site.py b/Lib/site.py
|
|
|
f992f7 |
index c360802..868b7cb 100644
|
|
|
f992f7 |
--- a/Lib/site.py
|
|
|
f992f7 |
+++ b/Lib/site.py
|
|
|
21eb11 |
@@ -288,12 +288,16 @@ def getsitepackages():
|
|
|
23b3e9 |
if sys.platform in ('os2emx', 'riscos'):
|
|
|
23b3e9 |
sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
|
|
|
23b3e9 |
elif os.sep == '/':
|
|
|
23b3e9 |
+ sitepackages.append(os.path.join(prefix, "lib64",
|
|
|
23b3e9 |
+ "python" + sys.version[:3],
|
|
|
23b3e9 |
+ "site-packages"))
|
|
|
23b3e9 |
sitepackages.append(os.path.join(prefix, "lib",
|
|
|
23b3e9 |
"python" + sys.version[:3],
|
|
|
23b3e9 |
"site-packages"))
|
|
|
23b3e9 |
sitepackages.append(os.path.join(prefix, "lib", "site-python"))
|
|
|
23b3e9 |
else:
|
|
|
23b3e9 |
sitepackages.append(prefix)
|
|
|
23b3e9 |
+ sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
|
|
|
23b3e9 |
sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
|
|
|
f992f7 |
return sitepackages
|
|
|
f992f7 |
|
|
|
f992f7 |
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
|
|
|
b54164 |
index b4384ee..5e8a726 100644
|
|
|
f992f7 |
--- a/Lib/test/test_site.py
|
|
|
f992f7 |
+++ b/Lib/test/test_site.py
|
|
|
b54164 |
@@ -254,17 +254,20 @@ class HelperFunctionsTests(unittest.TestCase):
|
|
|
f992f7 |
self.assertEqual(dirs[0], wanted)
|
|
|
23b3e9 |
elif os.sep == '/':
|
|
|
f992f7 |
# OS X, Linux, FreeBSD, etc
|
|
|
23b3e9 |
- self.assertEqual(len(dirs), 2)
|
|
|
23b3e9 |
- wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
|
|
23b3e9 |
+ self.assertEqual(len(dirs), 3)
|
|
|
23b3e9 |
+ wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
|
|
|
23b3e9 |
'site-packages')
|
|
|
23b3e9 |
self.assertEqual(dirs[0], wanted)
|
|
|
23b3e9 |
- wanted = os.path.join('xoxo', 'lib', 'site-python')
|
|
|
23b3e9 |
+ wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
|
|
|
23b3e9 |
+ 'site-packages')
|
|
|
23b3e9 |
self.assertEqual(dirs[1], wanted)
|
|
|
23b3e9 |
+ wanted = os.path.join('xoxo', 'lib', 'site-python')
|
|
|
23b3e9 |
+ self.assertEqual(dirs[2], wanted)
|
|
|
23b3e9 |
else:
|
|
|
23b3e9 |
# other platforms
|
|
|
23b3e9 |
self.assertEqual(len(dirs), 2)
|
|
|
23b3e9 |
self.assertEqual(dirs[0], 'xoxo')
|
|
|
23b3e9 |
- wanted = os.path.join('xoxo', 'lib', 'site-packages')
|
|
|
23b3e9 |
+ wanted = os.path.join('xoxo', 'lib64', 'site-packages')
|
|
|
23b3e9 |
self.assertEqual(dirs[1], wanted)
|
|
|
23b3e9 |
|
|
|
b54164 |
def test_no_home_directory(self):
|
|
|
f992f7 |
diff --git a/Makefile.pre.in b/Makefile.pre.in
|
|
|
b54164 |
index 0e43da0..2c43611 100644
|
|
|
f992f7 |
--- a/Makefile.pre.in
|
|
|
f992f7 |
+++ b/Makefile.pre.in
|
|
|
b54164 |
@@ -110,7 +110,7 @@ LIBDIR= @libdir@
|
|
|
23b3e9 |
MANDIR= @mandir@
|
|
|
23b3e9 |
INCLUDEDIR= @includedir@
|
|
|
23b3e9 |
CONFINCLUDEDIR= $(exec_prefix)/include
|
|
|
23b3e9 |
-SCRIPTDIR= $(prefix)/lib
|
|
|
23b3e9 |
+SCRIPTDIR= $(prefix)/lib64
|
|
|
23b3e9 |
|
|
|
23b3e9 |
# Detailed destination directories
|
|
|
23b3e9 |
BINLIBDEST= $(LIBDIR)/python$(VERSION)
|
|
|
f992f7 |
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
|
|
|
b54164 |
index 2775a27..00e5f18 100644
|
|
|
f992f7 |
--- a/Modules/Setup.dist
|
|
|
f992f7 |
+++ b/Modules/Setup.dist
|
|
|
21eb11 |
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
|
|
|
21eb11 |
# Edit the variables DB and DBLIBVERto point to the db top directory
|
|
|
21eb11 |
# and the subdirectory of PORT where you built it.
|
|
|
21eb11 |
DBINC=/usr/include/libdb
|
|
|
21eb11 |
-DBLIB=/usr/lib
|
|
|
21eb11 |
+DBLIB=/usr/lib64
|
|
|
21eb11 |
_bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
|
|
|
21eb11 |
|
|
|
21eb11 |
# Historical Berkeley DB 1.85
|
|
|
21eb11 |
@@ -462,7 +462,7 @@ cPickle cPickle.c
|
|
|
21eb11 |
# Andrew Kuchling's zlib module.
|
|
|
21eb11 |
# This require zlib 1.1.3 (or later).
|
|
|
21eb11 |
# See http://www.gzip.org/zlib/
|
|
|
21eb11 |
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
|
|
|
21eb11 |
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
|
|
|
21eb11 |
|
|
|
21eb11 |
# Interface to the Expat XML parser
|
|
|
b54164 |
# More information on Expat can be found at www.libexpat.org.
|
|
|
f992f7 |
diff --git a/Modules/getpath.c b/Modules/getpath.c
|
|
|
f992f7 |
index fd33a01..5b0eae6 100644
|
|
|
f992f7 |
--- a/Modules/getpath.c
|
|
|
f992f7 |
+++ b/Modules/getpath.c
|
|
|
f992f7 |
@@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
|
|
|
23b3e9 |
static char exec_prefix[MAXPATHLEN+1];
|
|
|
23b3e9 |
static char progpath[MAXPATHLEN+1];
|
|
|
23b3e9 |
static char *module_search_path = NULL;
|
|
|
23b3e9 |
-static char lib_python[] = "lib/python" VERSION;
|
|
|
23b3e9 |
+static char lib_python[] = "lib64/python" VERSION;
|
|
|
23b3e9 |
|
|
|
23b3e9 |
static void
|
|
|
23b3e9 |
reduce(char *dir)
|
|
|
f992f7 |
@@ -538,7 +538,7 @@ calculate_path(void)
|
|
|
23b3e9 |
}
|
|
|
23b3e9 |
else
|
|
|
23b3e9 |
strncpy(zip_path, PREFIX, MAXPATHLEN);
|
|
|
23b3e9 |
- joinpath(zip_path, "lib/python00.zip");
|
|
|
23b3e9 |
+ joinpath(zip_path, "lib64/python00.zip");
|
|
|
23b3e9 |
bufsz = strlen(zip_path); /* Replace "00" with version */
|
|
|
23b3e9 |
zip_path[bufsz - 6] = VERSION[0];
|
|
|
23b3e9 |
zip_path[bufsz - 5] = VERSION[2];
|
|
|
f992f7 |
@@ -548,7 +548,7 @@ calculate_path(void)
|
|
|
23b3e9 |
fprintf(stderr,
|
|
|
23b3e9 |
"Could not find platform dependent libraries <exec_prefix>\n");
|
|
|
23b3e9 |
strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
|
|
|
23b3e9 |
- joinpath(exec_prefix, "lib/lib-dynload");
|
|
|
23b3e9 |
+ joinpath(exec_prefix, "lib64/lib-dynload");
|
|
|
23b3e9 |
}
|
|
|
23b3e9 |
/* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
|
|
|
23b3e9 |
|
|
|
f992f7 |
diff --git a/setup.py b/setup.py
|
|
|
b54164 |
index 06a11f8..fa284aa 100644
|
|
|
f992f7 |
--- a/setup.py
|
|
|
f992f7 |
+++ b/setup.py
|
|
|
f992f7 |
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
|
|
|
23b3e9 |
def detect_modules(self):
|
|
|
23b3e9 |
# Ensure that /usr/local is always used
|
|
|
21eb11 |
if not cross_compiling:
|
|
|
21eb11 |
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
|
|
|
21eb11 |
+ add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
|
|
|
21eb11 |
add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
|
|
|
21eb11 |
if cross_compiling:
|
|
|
21eb11 |
self.add_gcc_paths()
|
|
|
f992f7 |
@@ -782,11 +782,11 @@ class PyBuildExt(build_ext):
|
|
|
23b3e9 |
elif curses_library:
|
|
|
23b3e9 |
readline_libs.append(curses_library)
|
|
|
23b3e9 |
elif self.compiler.find_library_file(lib_dirs +
|
|
|
23b3e9 |
- ['/usr/lib/termcap'],
|
|
|
23b3e9 |
+ ['/usr/lib64/termcap'],
|
|
|
23b3e9 |
'termcap'):
|
|
|
23b3e9 |
readline_libs.append('termcap')
|
|
|
23b3e9 |
exts.append( Extension('readline', ['readline.c'],
|
|
|
23b3e9 |
- library_dirs=['/usr/lib/termcap'],
|
|
|
23b3e9 |
+ library_dirs=['/usr/lib64/termcap'],
|
|
|
23b3e9 |
extra_link_args=readline_extra_link_args,
|
|
|
23b3e9 |
libraries=readline_libs) )
|
|
|
23b3e9 |
else:
|
|
|
f992f7 |
@@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
|
|
|
23b3e9 |
if krb5_h:
|
|
|
23b3e9 |
ssl_incs += krb5_h
|
|
|
23b3e9 |
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
|
|
|
23b3e9 |
- ['/usr/local/ssl/lib',
|
|
|
23b3e9 |
- '/usr/contrib/ssl/lib/'
|
|
|
23b3e9 |
+ ['/usr/local/ssl/lib64',
|
|
|
23b3e9 |
+ '/usr/contrib/ssl/lib64/'
|
|
|
23b3e9 |
] )
|
|
|
23b3e9 |
|
|
|
23b3e9 |
if (ssl_incs is not None and
|