Blame SOURCES/00102-lib64.patch

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