Blame 00102-lib64.patch

57f132b
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
57f132b
index d768dc5..a051164 100644
57f132b
--- a/Lib/distutils/command/install.py
57f132b
+++ b/Lib/distutils/command/install.py
57f132b
@@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
e32ce18
 INSTALL_SCHEMES = {
e32ce18
     'unix_prefix': {
e32ce18
         'purelib': '$base/lib/python$py_version_short/site-packages',
e32ce18
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
e32ce18
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
e32ce18
         'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
e32ce18
         'scripts': '$base/bin',
e32ce18
         'data'   : '$base',
e32ce18
         },
e32ce18
     'unix_home': {
e32ce18
         'purelib': '$base/lib/python',
e32ce18
-        'platlib': '$base/lib/python',
e32ce18
+        'platlib': '$base/lib64/python',
e32ce18
         'headers': '$base/include/python/$dist_name',
e32ce18
         'scripts': '$base/bin',
e32ce18
         'data'   : '$base',
57f132b
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
57f132b
index a1452fe..795c559 100644
57f132b
--- a/Lib/distutils/sysconfig.py
57f132b
+++ b/Lib/distutils/sysconfig.py
57f132b
@@ -141,8 +141,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
e32ce18
             prefix = plat_specific and EXEC_PREFIX or PREFIX
e32ce18
 
e32ce18
     if os.name == "posix":
e32ce18
+        if plat_specific or standard_lib:
e32ce18
+            lib = "lib64"
e32ce18
+        else:
e32ce18
+            lib = "lib"
e32ce18
         libpython = os.path.join(prefix,
e32ce18
-                                 "lib", "python" + get_python_version())
e32ce18
+                                 lib, "python" + get_python_version())
e32ce18
         if standard_lib:
e32ce18
             return libpython
e32ce18
         else:
57f132b
diff --git a/Lib/site.py b/Lib/site.py
57f132b
index 3c8584b..2e47052 100644
57f132b
--- a/Lib/site.py
57f132b
+++ b/Lib/site.py
57f132b
@@ -304,12 +304,16 @@ def getsitepackages(prefixes=None):
e32ce18
         seen.add(prefix)
e32ce18
 
e32ce18
         if os.sep == '/':
e32ce18
+            sitepackages.append(os.path.join(prefix, "lib64",
e32ce18
+                                        "python" + sys.version[:3],
e32ce18
+                                        "site-packages"))
e32ce18
             sitepackages.append(os.path.join(prefix, "lib",
e32ce18
                                         "python" + sys.version[:3],
e32ce18
                                         "site-packages"))
e32ce18
             sitepackages.append(os.path.join(prefix, "lib", "site-python"))
e32ce18
         else:
e32ce18
             sitepackages.append(prefix)
e32ce18
+            sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
e32ce18
             sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
e32ce18
         if sys.platform == "darwin":
e32ce18
             # for framework builds *only* we add the standard Apple
57f132b
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
57f132b
index dbf7767..dba45c7 100644
57f132b
--- a/Lib/sysconfig.py
57f132b
+++ b/Lib/sysconfig.py
57f132b
@@ -20,10 +20,10 @@ __all__ = [
e32ce18
 
e32ce18
 _INSTALL_SCHEMES = {
e32ce18
     'posix_prefix': {
e32ce18
-        'stdlib': '{installed_base}/lib/python{py_version_short}',
e32ce18
-        'platstdlib': '{platbase}/lib/python{py_version_short}',
e32ce18
+        'stdlib': '{installed_base}/lib64/python{py_version_short}',
e32ce18
+        'platstdlib': '{platbase}/lib64/python{py_version_short}',
e32ce18
         'purelib': '{base}/lib/python{py_version_short}/site-packages',
e32ce18
-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
e32ce18
+        'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
e32ce18
         'include':
e32ce18
             '{installed_base}/include/python{py_version_short}{abiflags}',
e32ce18
         'platinclude':
57f132b
@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {
e32ce18
         'data': '{userbase}',
e32ce18
         },
e32ce18
     'posix_user': {
e32ce18
-        'stdlib': '{userbase}/lib/python{py_version_short}',
e32ce18
-        'platstdlib': '{userbase}/lib/python{py_version_short}',
e32ce18
+        'stdlib': '{userbase}/lib64/python{py_version_short}',
e32ce18
+        'platstdlib': '{userbase}/lib64/python{py_version_short}',
e32ce18
         'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
e32ce18
-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
e32ce18
+        'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
e32ce18
         'include': '{userbase}/include/python{py_version_short}',
e32ce18
         'scripts': '{userbase}/bin',
e32ce18
         'data': '{userbase}',
57f132b
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
57f132b
index f71cf73..28b5bb9 100644
57f132b
--- a/Lib/test/test_site.py
57f132b
+++ b/Lib/test/test_site.py
57f132b
@@ -243,12 +243,15 @@ class HelperFunctionsTests(unittest.TestCase):
e32ce18
             self.assertEqual(dirs[2], wanted)
e32ce18
         elif os.sep == '/':
e32ce18
             # OS X non-framwework builds, Linux, FreeBSD, etc
e32ce18
-            self.assertEqual(len(dirs), 2)
e32ce18
-            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
e32ce18
+            self.assertEqual(len(dirs), 3)
e32ce18
+            wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
e32ce18
                                   'site-packages')
e32ce18
             self.assertEqual(dirs[0], wanted)
e32ce18
-            wanted = os.path.join('xoxo', 'lib', 'site-python')
e32ce18
+            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
e32ce18
+                                  'site-packages')
e32ce18
             self.assertEqual(dirs[1], wanted)
e32ce18
+            wanted = os.path.join('xoxo', 'lib', 'site-python')
e32ce18
+            self.assertEqual(dirs[2], wanted)
e32ce18
         else:
e32ce18
             # other platforms
e32ce18
             self.assertEqual(len(dirs), 2)
57f132b
diff --git a/Makefile.pre.in b/Makefile.pre.in
57f132b
index e19fc00..9a2538b 100644
57f132b
--- a/Makefile.pre.in
57f132b
+++ b/Makefile.pre.in
57f132b
@@ -120,7 +120,7 @@ LIBDIR=		@libdir@
e32ce18
 MANDIR=		@mandir@
e32ce18
 INCLUDEDIR=	@includedir@
e32ce18
 CONFINCLUDEDIR=	$(exec_prefix)/include
e32ce18
-SCRIPTDIR=	$(prefix)/lib
e32ce18
+SCRIPTDIR=	$(prefix)/lib64
e32ce18
 ABIFLAGS=	@ABIFLAGS@
e32ce18
 
e32ce18
 # Detailed destination directories
57f132b
diff --git a/Modules/getpath.c b/Modules/getpath.c
57f132b
index 13e3817..a31ab0c 100644
57f132b
--- a/Modules/getpath.c
57f132b
+++ b/Modules/getpath.c
57f132b
@@ -118,8 +118,8 @@
e32ce18
 #endif
e32ce18
 
e32ce18
 #ifndef PYTHONPATH
e32ce18
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
e32ce18
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
e32ce18
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
e32ce18
+              EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
e32ce18
 #endif
e32ce18
 
e32ce18
 #ifndef LANDMARK
57f132b
@@ -494,7 +494,7 @@ calculate_path(void)
e32ce18
     _pythonpath = _Py_char2wchar(PYTHONPATH, NULL);
e32ce18
     _prefix = _Py_char2wchar(PREFIX, NULL);
e32ce18
     _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL);
e32ce18
-    lib_python = _Py_char2wchar("lib/python" VERSION, NULL);
e32ce18
+    lib_python = _Py_char2wchar("lib64/python" VERSION, NULL);
e32ce18
 
e32ce18
     if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
e32ce18
         Py_FatalError(
57f132b
@@ -683,7 +683,7 @@ calculate_path(void)
e32ce18
     }
e32ce18
     else
e32ce18
         wcsncpy(zip_path, _prefix, MAXPATHLEN);
e32ce18
-    joinpath(zip_path, L"lib/python00.zip");
e32ce18
+    joinpath(zip_path, L"lib64/python00.zip");
e32ce18
     bufsz = wcslen(zip_path);   /* Replace "00" with version */
e32ce18
     zip_path[bufsz - 6] = VERSION[0];
e32ce18
     zip_path[bufsz - 5] = VERSION[2];
57f132b
@@ -695,7 +695,7 @@ calculate_path(void)
e32ce18
             fprintf(stderr,
e32ce18
                 "Could not find platform dependent libraries <exec_prefix>\n");
e32ce18
         wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
e32ce18
-        joinpath(exec_prefix, L"lib/lib-dynload");
e32ce18
+        joinpath(exec_prefix, L"lib64/lib-dynload");
e32ce18
     }
e32ce18
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
e32ce18
 
57f132b
diff --git a/configure b/configure
57f132b
index 7b91f91..9e830ed 100755
57f132b
--- a/configure
57f132b
+++ b/configure
57f132b
@@ -14030,7 +14030,7 @@ LDVERSION='$(VERSION)$(ABIFLAGS)'
57f132b
 $as_echo "$LDVERSION" >&6; }
57f132b
 
57f132b
 
57f132b
-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
57f132b
+LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
57f132b
 
57f132b
 
57f132b
 # Check whether right shifting a negative integer extends the sign bit
57f132b
diff --git a/configure.ac b/configure.ac
57f132b
index 3394d84..1321c93 100644
57f132b
--- a/configure.ac
57f132b
+++ b/configure.ac
57f132b
@@ -4115,7 +4115,7 @@ AC_MSG_RESULT($LDVERSION)
57f132b
 
57f132b
 dnl define LIBPL after ABIFLAGS and LDVERSION is defined.
57f132b
 AC_SUBST(PY_ENABLE_SHARED)
57f132b
-LIBPL='$(prefix)'"/lib/python${VERSION}/config-${LDVERSION}"
57f132b
+LIBPL='$(prefix)'"/lib64/python${VERSION}/config-${LDVERSION}"
57f132b
 AC_SUBST(LIBPL)
57f132b
 
57f132b
 # Check whether right shifting a negative integer extends the sign bit
57f132b
diff --git a/setup.py b/setup.py
57f132b
index 2779658..55e0bb8 100644
57f132b
--- a/setup.py
57f132b
+++ b/setup.py
57f132b
@@ -451,7 +451,7 @@ class PyBuildExt(build_ext):
e32ce18
         # directories (i.e. '.' and 'Include') must be first.  See issue
e32ce18
         # 10520.
e32ce18
         if not cross_compiling:
e32ce18
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
e32ce18
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
e32ce18
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
e32ce18
         # only change this for cross builds for 3.3, issues on Mageia
e32ce18
         if cross_compiling:
57f132b
@@ -730,11 +730,11 @@ class PyBuildExt(build_ext):
e32ce18
             elif curses_library:
e32ce18
                 readline_libs.append(curses_library)
e32ce18
             elif self.compiler.find_library_file(lib_dirs +
e32ce18
-                                                     ['/usr/lib/termcap'],
e32ce18
+                                                     ['/usr/lib64/termcap'],
e32ce18
                                                      'termcap'):
e32ce18
                 readline_libs.append('termcap')
e32ce18
             exts.append( Extension('readline', ['readline.c'],
e32ce18
-                                   library_dirs=['/usr/lib/termcap'],
e32ce18
+                                   library_dirs=['/usr/lib64/termcap'],
e32ce18
                                    extra_link_args=readline_extra_link_args,
e32ce18
                                    libraries=readline_libs) )
e32ce18
         else:
57f132b
@@ -771,8 +771,8 @@ class PyBuildExt(build_ext):
e32ce18
             if krb5_h:
e32ce18
                 ssl_incs += krb5_h
e32ce18
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
e32ce18
-                                     ['/usr/local/ssl/lib',
e32ce18
-                                      '/usr/contrib/ssl/lib/'
e32ce18
+                                     ['/usr/local/ssl/lib64',
e32ce18
+                                      '/usr/contrib/ssl/lib64/'
e32ce18
                                      ] )
e32ce18
 
e32ce18
         if (ssl_incs is not None and