Blame SOURCES/00102-2.7.13-lib64.patch

8db7d0
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
8db7d0
index b9f1c6c..7b23714 100644
8db7d0
--- a/Lib/distutils/command/install.py
8db7d0
+++ b/Lib/distutils/command/install.py
8db7d0
@@ -42,14 +42,14 @@ else:
8db7d0
 INSTALL_SCHEMES = {
8db7d0
     'unix_prefix': {
8db7d0
         'purelib': '$base/lib/python$py_version_short/site-packages',
8db7d0
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
8db7d0
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
8db7d0
         'headers': '$base/include/python$py_version_short/$dist_name',
8db7d0
         'scripts': '$base/bin',
8db7d0
         'data'   : '$base',
8db7d0
         },
8db7d0
     'unix_home': {
8db7d0
         'purelib': '$base/lib/python',
8db7d0
-        'platlib': '$base/lib/python',
8db7d0
+        'platlib': '$base/lib64/python',
8db7d0
         'headers': '$base/include/python/$dist_name',
8db7d0
         'scripts': '$base/bin',
8db7d0
         'data'   : '$base',
8db7d0
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
254af2
index 031f809..ec5d584 100644
8db7d0
--- a/Lib/distutils/sysconfig.py
8db7d0
+++ b/Lib/distutils/sysconfig.py
254af2
@@ -120,8 +120,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
8db7d0
         prefix = plat_specific and EXEC_PREFIX or PREFIX
8db7d0
 
8db7d0
     if os.name == "posix":
8db7d0
+        if plat_specific or standard_lib:
8db7d0
+            lib = "lib64"
8db7d0
+        else:
8db7d0
+            lib = "lib"
8db7d0
         libpython = os.path.join(prefix,
8db7d0
-                                 "lib", "python" + get_python_version())
8db7d0
+                                 lib, "python" + get_python_version())
8db7d0
         if standard_lib:
8db7d0
             return libpython
8db7d0
         else:
8db7d0
diff --git a/Lib/site.py b/Lib/site.py
8db7d0
index c360802..868b7cb 100644
8db7d0
--- a/Lib/site.py
8db7d0
+++ b/Lib/site.py
8db7d0
@@ -288,12 +288,16 @@ def getsitepackages():
8db7d0
         if sys.platform in ('os2emx', 'riscos'):
8db7d0
             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
8db7d0
         elif os.sep == '/':
8db7d0
+            sitepackages.append(os.path.join(prefix, "lib64",
8db7d0
+                                        "python" + sys.version[:3],
8db7d0
+                                        "site-packages"))
8db7d0
             sitepackages.append(os.path.join(prefix, "lib",
8db7d0
                                         "python" + sys.version[:3],
8db7d0
                                         "site-packages"))
8db7d0
             sitepackages.append(os.path.join(prefix, "lib", "site-python"))
8db7d0
         else:
8db7d0
             sitepackages.append(prefix)
8db7d0
+            sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
8db7d0
             sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
8db7d0
     return sitepackages
8db7d0
 
8db7d0
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
254af2
index b4384ee..349f688 100644
8db7d0
--- a/Lib/test/test_site.py
8db7d0
+++ b/Lib/test/test_site.py
254af2
@@ -254,17 +254,20 @@ class HelperFunctionsTests(unittest.TestCase):
8db7d0
             self.assertEqual(dirs[0], wanted)
8db7d0
         elif os.sep == '/':
8db7d0
             # OS X, Linux, FreeBSD, etc
8db7d0
-            self.assertEqual(len(dirs), 2)
8db7d0
-            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
8db7d0
+            self.assertEqual(len(dirs), 3)
8db7d0
+            wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
8db7d0
                                   'site-packages')
8db7d0
             self.assertEqual(dirs[0], wanted)
8db7d0
-            wanted = os.path.join('xoxo', 'lib', 'site-python')
8db7d0
+            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
8db7d0
+                                   'site-packages')
8db7d0
             self.assertEqual(dirs[1], wanted)
8db7d0
+            wanted = os.path.join('xoxo', 'lib', 'site-python')
8db7d0
+            self.assertEqual(dirs[2], wanted)
8db7d0
         else:
8db7d0
             # other platforms
8db7d0
             self.assertEqual(len(dirs), 2)
8db7d0
             self.assertEqual(dirs[0], 'xoxo')
8db7d0
-            wanted = os.path.join('xoxo', 'lib', 'site-packages')
8db7d0
+            wanted = os.path.join('xoxo', 'lib64', 'site-packages')
8db7d0
             self.assertEqual(dirs[1], wanted)
8db7d0
 
254af2
     def test_no_home_directory(self):
8db7d0
diff --git a/Makefile.pre.in b/Makefile.pre.in
254af2
index 4f59dd3..877698c 100644
8db7d0
--- a/Makefile.pre.in
8db7d0
+++ b/Makefile.pre.in
254af2
@@ -110,7 +110,7 @@ LIBDIR=		@libdir@
8db7d0
 MANDIR=		@mandir@
8db7d0
 INCLUDEDIR=	@includedir@
8db7d0
 CONFINCLUDEDIR=	$(exec_prefix)/include
8db7d0
-SCRIPTDIR=	$(prefix)/lib
8db7d0
+SCRIPTDIR=	$(prefix)/lib64
8db7d0
 
8db7d0
 # Detailed destination directories
8db7d0
 BINLIBDEST=	$(LIBDIR)/python$(VERSION)
8db7d0
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
254af2
index 2cf35a9..c4c88cb 100644
8db7d0
--- a/Modules/Setup.dist
8db7d0
+++ b/Modules/Setup.dist
254af2
@@ -231,7 +231,7 @@ crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
8db7d0
 # Some more UNIX dependent modules -- off by default, since these
8db7d0
 # are not supported by all UNIX systems:
8db7d0
 
8db7d0
-nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
8db7d0
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib64/nsl
8db7d0
 termios termios.c	# Steen Lumholt's termios module
8db7d0
 resource resource.c	# Jeremy Hylton's rlimit interface
8db7d0
 
8db7d0
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
8db7d0
 # Edit the variables DB and DBLIBVERto point to the db top directory
8db7d0
 # and the subdirectory of PORT where you built it.
8db7d0
 DBINC=/usr/include/libdb
8db7d0
-DBLIB=/usr/lib
8db7d0
+DBLIB=/usr/lib64
8db7d0
 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
8db7d0
 
8db7d0
 # Historical Berkeley DB 1.85
8db7d0
@@ -462,7 +462,7 @@ cPickle cPickle.c
8db7d0
 # Andrew Kuchling's zlib module.
8db7d0
 # This require zlib 1.1.3 (or later).
8db7d0
 # See http://www.gzip.org/zlib/
8db7d0
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
8db7d0
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
8db7d0
 
8db7d0
 # Interface to the Expat XML parser
254af2
 # More information on Expat can be found at www.libexpat.org.
8db7d0
diff --git a/Modules/getpath.c b/Modules/getpath.c
8db7d0
index fd33a01..c5c86fd 100644
8db7d0
--- a/Modules/getpath.c
8db7d0
+++ b/Modules/getpath.c
8db7d0
@@ -108,7 +108,7 @@ static char prefix[MAXPATHLEN+1];
8db7d0
 static char exec_prefix[MAXPATHLEN+1];
8db7d0
 static char progpath[MAXPATHLEN+1];
8db7d0
 static char *module_search_path = NULL;
8db7d0
-static char lib_python[] = "lib/python" VERSION;
8db7d0
+static char lib_python[] = "lib64/python" VERSION;
8db7d0
 
8db7d0
 static void
8db7d0
 reduce(char *dir)
8db7d0
@@ -548,7 +548,7 @@ calculate_path(void)
8db7d0
             fprintf(stderr,
8db7d0
                 "Could not find platform dependent libraries <exec_prefix>\n");
8db7d0
         strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
8db7d0
-        joinpath(exec_prefix, "lib/lib-dynload");
8db7d0
+        joinpath(exec_prefix, "lib64/lib-dynload");
8db7d0
     }
8db7d0
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
8db7d0
 
8db7d0
diff --git a/setup.py b/setup.py
254af2
index 0288a6b..7905f6f 100644
8db7d0
--- a/setup.py
8db7d0
+++ b/setup.py
8db7d0
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
8db7d0
     def detect_modules(self):
8db7d0
         # Ensure that /usr/local is always used
8db7d0
         if not cross_compiling:
8db7d0
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
8db7d0
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
8db7d0
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
8db7d0
         if cross_compiling:
8db7d0
             self.add_gcc_paths()
8db7d0
@@ -782,11 +782,11 @@ class PyBuildExt(build_ext):
8db7d0
             elif curses_library:
8db7d0
                 readline_libs.append(curses_library)
8db7d0
             elif self.compiler.find_library_file(lib_dirs +
8db7d0
-                                                     ['/usr/lib/termcap'],
8db7d0
+                                                     ['/usr/lib64/termcap'],
8db7d0
                                                      'termcap'):
8db7d0
                 readline_libs.append('termcap')
8db7d0
             exts.append( Extension('readline', ['readline.c'],
8db7d0
-                                   library_dirs=['/usr/lib/termcap'],
8db7d0
+                                   library_dirs=['/usr/lib64/termcap'],
8db7d0
                                    extra_link_args=readline_extra_link_args,
8db7d0
                                    libraries=readline_libs) )
8db7d0
         else:
8db7d0
@@ -821,8 +821,8 @@ class PyBuildExt(build_ext):
8db7d0
             if krb5_h:
8db7d0
                 ssl_incs += krb5_h
8db7d0
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
8db7d0
-                                     ['/usr/local/ssl/lib',
8db7d0
-                                      '/usr/contrib/ssl/lib/'
8db7d0
+                                     ['/usr/local/ssl/lib64',
8db7d0
+                                      '/usr/contrib/ssl/lib64/'
8db7d0
                                      ] )
8db7d0
 
8db7d0
         if (ssl_incs is not None and