Blame SOURCES/00102-lib64.patch

dd3773
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
dd3773
index 9474e9c..c0ce4c6 100644
dd3773
--- a/Lib/distutils/command/install.py
dd3773
+++ b/Lib/distutils/command/install.py
dd3773
@@ -30,14 +30,14 @@ WINDOWS_SCHEME = {
dd3773
 INSTALL_SCHEMES = {
dd3773
     'unix_prefix': {
dd3773
         'purelib': '$base/lib/python$py_version_short/site-packages',
dd3773
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
dd3773
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
dd3773
         'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
dd3773
         'scripts': '$base/bin',
dd3773
         'data'   : '$base',
dd3773
         },
dd3773
     'unix_home': {
dd3773
         'purelib': '$base/lib/python',
dd3773
-        'platlib': '$base/lib/python',
dd3773
+        'platlib': '$base/lib64/python',
dd3773
         'headers': '$base/include/python/$dist_name',
dd3773
         'scripts': '$base/bin',
dd3773
         'data'   : '$base',
dd3773
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
dd3773
index 026cca7..6d3e077 100644
dd3773
--- a/Lib/distutils/sysconfig.py
dd3773
+++ b/Lib/distutils/sysconfig.py
dd3773
@@ -132,8 +132,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
dd3773
             prefix = plat_specific and EXEC_PREFIX or PREFIX
dd3773
 
dd3773
     if os.name == "posix":
dd3773
+        if plat_specific or standard_lib:
dd3773
+            lib = "lib64"
dd3773
+        else:
dd3773
+            lib = "lib"
dd3773
         libpython = os.path.join(prefix,
dd3773
-                                 "lib", "python" + get_python_version())
dd3773
+                                 lib, "python" + get_python_version())
dd3773
         if standard_lib:
dd3773
             return libpython
dd3773
         else:
dd3773
diff a/Lib/distutils/tests/test_install.py b/Lib/distutils/tests/test_install.py
dd3773
--- a/Lib/distutils/tests/test_install.py
dd3773
+++ b/Lib/distutils/tests/test_install.py
dd3773
@@ -57,8 +57,9 @@
dd3773
             self.assertEqual(got, expected)
dd3773
 
dd3773
         libdir = os.path.join(destination, "lib", "python")
dd3773
+        platlibdir = os.path.join(destination, "lib64", "python")
dd3773
         check_path(cmd.install_lib, libdir)
dd3773
-        check_path(cmd.install_platlib, libdir)
dd3773
+        check_path(cmd.install_platlib, platlibdir)
dd3773
         check_path(cmd.install_purelib, libdir)
dd3773
         check_path(cmd.install_headers,
dd3773
                    os.path.join(destination, "include", "python", "foopkg"))
dd3773
diff --git a/Lib/site.py b/Lib/site.py
dd3773
index a84e3bb..ba0d3ea 100644
dd3773
--- a/Lib/site.py
dd3773
+++ b/Lib/site.py
dd3773
@@ -303,11 +303,15 @@ def getsitepackages(prefixes=None):
dd3773
         seen.add(prefix)
dd3773
 
dd3773
         if os.sep == '/':
dd3773
+            sitepackages.append(os.path.join(prefix, "lib64",
dd3773
+                                        "python" + sys.version[:3],
dd3773
+                                        "site-packages"))
dd3773
             sitepackages.append(os.path.join(prefix, "lib",
dd3773
                                         "python%d.%d" % sys.version_info[:2],
dd3773
                                         "site-packages"))
dd3773
         else:
dd3773
             sitepackages.append(prefix)
dd3773
+            sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
dd3773
             sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
dd3773
         if sys.platform == "darwin":
dd3773
             # for framework builds *only* we add the standard Apple
dd3773
diff --git a/Lib/sysconfig.py b/Lib/sysconfig.py
dd3773
index b9bbfe5..2a5f29c 100644
dd3773
--- a/Lib/sysconfig.py
dd3773
+++ b/Lib/sysconfig.py
dd3773
@@ -20,10 +20,10 @@ __all__ = [
dd3773
 
dd3773
 _INSTALL_SCHEMES = {
dd3773
     'posix_prefix': {
dd3773
-        'stdlib': '{installed_base}/lib/python{py_version_short}',
dd3773
-        'platstdlib': '{platbase}/lib/python{py_version_short}',
dd3773
+        'stdlib': '{installed_base}/lib64/python{py_version_short}',
dd3773
+        'platstdlib': '{platbase}/lib64/python{py_version_short}',
dd3773
         'purelib': '{base}/lib/python{py_version_short}/site-packages',
dd3773
-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
dd3773
+        'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
dd3773
         'include':
dd3773
             '{installed_base}/include/python{py_version_short}{abiflags}',
dd3773
         'platinclude':
dd3773
@@ -61,10 +61,10 @@ _INSTALL_SCHEMES = {
dd3773
         'data': '{userbase}',
dd3773
         },
dd3773
     'posix_user': {
dd3773
-        'stdlib': '{userbase}/lib/python{py_version_short}',
dd3773
-        'platstdlib': '{userbase}/lib/python{py_version_short}',
dd3773
+        'stdlib': '{userbase}/lib64/python{py_version_short}',
dd3773
+        'platstdlib': '{userbase}/lib64/python{py_version_short}',
dd3773
         'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
dd3773
-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
dd3773
+        'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
dd3773
         'include': '{userbase}/include/python{py_version_short}',
dd3773
         'scripts': '{userbase}/bin',
dd3773
         'data': '{userbase}',
dd3773
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
dd3773
index f698927..bc977b5 100644
dd3773
--- a/Lib/test/test_site.py
dd3773
+++ b/Lib/test/test_site.py
dd3773
@@ -248,8 +248,8 @@ class HelperFunctionsTests(unittest.TestCase):
dd3773
             self.assertEqual(dirs[1], wanted)
dd3773
         elif os.sep == '/':
dd3773
             # OS X non-framework builds, Linux, FreeBSD, etc
dd3773
-            self.assertEqual(len(dirs), 1)
dd3773
-            wanted = os.path.join('xoxo', 'lib',
dd3773
+            self.assertEqual(len(dirs), 2)
dd3773
+            wanted = os.path.join('xoxo', 'lib64',
dd3773
                                   'python%d.%d' % sys.version_info[:2],
dd3773
                                   'site-packages')
dd3773
             self.assertEqual(dirs[0], wanted)
dd3773
diff --git a/Makefile.pre.in b/Makefile.pre.in
dd3773
index 8fa7934..a693917 100644
dd3773
--- a/Makefile.pre.in
dd3773
+++ b/Makefile.pre.in
dd3773
@@ -126,7 +126,7 @@ LIBDIR=		@libdir@
dd3773
 MANDIR=		@mandir@
dd3773
 INCLUDEDIR=	@includedir@
dd3773
 CONFINCLUDEDIR=	$(exec_prefix)/include
dd3773
-SCRIPTDIR=	$(prefix)/lib
dd3773
+SCRIPTDIR=	$(prefix)/lib64
dd3773
 ABIFLAGS=	@ABIFLAGS@
dd3773
 
dd3773
 # Detailed destination directories
dd3773
diff --git a/Modules/getpath.c b/Modules/getpath.c
dd3773
index 65b47a3..eaa756c 100644
dd3773
--- a/Modules/getpath.c
dd3773
+++ b/Modules/getpath.c
dd3773
@@ -494,7 +494,7 @@ calculate_path(void)
dd3773
     _pythonpath = Py_DecodeLocale(PYTHONPATH, NULL);
dd3773
     _prefix = Py_DecodeLocale(PREFIX, NULL);
dd3773
     _exec_prefix = Py_DecodeLocale(EXEC_PREFIX, NULL);
dd3773
-    lib_python = Py_DecodeLocale("lib/python" VERSION, NULL);
dd3773
+    lib_python = Py_DecodeLocale("lib64/python" VERSION, NULL);
dd3773
 
dd3773
     if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) {
dd3773
         Py_FatalError(
dd3773
@@ -683,7 +683,7 @@ calculate_path(void)
dd3773
     }
dd3773
     else
dd3773
         wcsncpy(zip_path, _prefix, MAXPATHLEN);
dd3773
-    joinpath(zip_path, L"lib/python00.zip");
dd3773
+    joinpath(zip_path, L"lib64/python00.zip");
dd3773
     bufsz = wcslen(zip_path);   /* Replace "00" with version */
dd3773
     zip_path[bufsz - 6] = VERSION[0];
dd3773
     zip_path[bufsz - 5] = VERSION[2];
dd3773
@@ -695,7 +695,7 @@ calculate_path(void)
dd3773
             fprintf(stderr,
dd3773
                 "Could not find platform dependent libraries <exec_prefix>\n");
dd3773
         wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
dd3773
-        joinpath(exec_prefix, L"lib/lib-dynload");
dd3773
+        joinpath(exec_prefix, L"lib64/lib-dynload");
dd3773
     }
dd3773
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
dd3773
 
dd3773
diff --git a/setup.py b/setup.py
dd3773
index 0f2dfc4..da37896 100644
dd3773
--- a/setup.py
dd3773
+++ b/setup.py
dd3773
@@ -492,7 +492,7 @@ class PyBuildExt(build_ext):
dd3773
         # directories (i.e. '.' and 'Include') must be first.  See issue
dd3773
         # 10520.
dd3773
         if not cross_compiling:
dd3773
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
dd3773
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
dd3773
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
dd3773
         # only change this for cross builds for 3.3, issues on Mageia
dd3773
         if cross_compiling:
dd3773
@@ -780,11 +780,11 @@ class PyBuildExt(build_ext):
dd3773
             elif curses_library:
dd3773
                 readline_libs.append(curses_library)
dd3773
             elif self.compiler.find_library_file(lib_dirs +
dd3773
-                                                     ['/usr/lib/termcap'],
dd3773
+                                                     ['/usr/lib64/termcap'],
dd3773
                                                      'termcap'):
dd3773
                 readline_libs.append('termcap')
dd3773
             exts.append( Extension('readline', ['readline.c'],
dd3773
-                                   library_dirs=['/usr/lib/termcap'],
dd3773
+                                   library_dirs=['/usr/lib64/termcap'],
dd3773
                                    extra_link_args=readline_extra_link_args,
dd3773
                                    libraries=readline_libs) )
dd3773
         else:
dd3773
@@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
dd3773
             if krb5_h:
dd3773
                 ssl_incs += krb5_h
dd3773
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
dd3773
-                                     ['/usr/local/ssl/lib',
dd3773
-                                      '/usr/contrib/ssl/lib/'
dd3773
+                                     ['/usr/local/ssl/lib64',
dd3773
+                                      '/usr/contrib/ssl/lib64/'
dd3773
                                      ] )
dd3773
 
dd3773
         if (ssl_incs is not None and