Blame SOURCES/00102-2.7.13-lib64.patch

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