Blame SOURCES/00102-lib64.patch

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