b0a6ae
diff -up Python-2.7.3/Lib/distutils/command/install.py.lib64 Python-2.7.3/Lib/distutils/command/install.py
b0a6ae
--- Python-2.7.3/Lib/distutils/command/install.py.lib64	2012-04-09 19:07:29.000000000 -0400
42d74b
+++ Python-2.7.3/Lib/distutils/command/install.py	2013-02-19 13:58:20.446015129 -0500
a7ef9c
@@ -42,14 +42,14 @@ else:
60b7a5
 INSTALL_SCHEMES = {
60b7a5
     'unix_prefix': {
60b7a5
         'purelib': '$base/lib/python$py_version_short/site-packages',
60b7a5
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
60b7a5
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
60b7a5
         'headers': '$base/include/python$py_version_short/$dist_name',
60b7a5
         'scripts': '$base/bin',
60b7a5
         'data'   : '$base',
60b7a5
         },
60b7a5
     'unix_home': {
60b7a5
         'purelib': '$base/lib/python',
60b7a5
-        'platlib': '$base/lib/python',
60b7a5
+        'platlib': '$base/lib64/python',
60b7a5
         'headers': '$base/include/python/$dist_name',
60b7a5
         'scripts': '$base/bin',
60b7a5
         'data'   : '$base',
b0a6ae
diff -up Python-2.7.3/Lib/distutils/sysconfig.py.lib64 Python-2.7.3/Lib/distutils/sysconfig.py
b0a6ae
--- Python-2.7.3/Lib/distutils/sysconfig.py.lib64	2012-04-09 19:07:29.000000000 -0400
42d74b
+++ Python-2.7.3/Lib/distutils/sysconfig.py	2013-02-19 13:58:20.446015129 -0500
c6247f
@@ -114,8 +114,12 @@ def get_python_lib(plat_specific=0, stan
60b7a5
         prefix = plat_specific and EXEC_PREFIX or PREFIX
60b7a5
 
60b7a5
     if os.name == "posix":
60b7a5
+        if plat_specific or standard_lib:
60b7a5
+            lib = "lib64"
60b7a5
+        else:
60b7a5
+            lib = "lib"
60b7a5
         libpython = os.path.join(prefix,
60b7a5
-                                 "lib", "python" + get_python_version())
60b7a5
+                                 lib, "python" + get_python_version())
60b7a5
         if standard_lib:
60b7a5
             return libpython
60b7a5
         else:
b0a6ae
diff -up Python-2.7.3/Lib/site.py.lib64 Python-2.7.3/Lib/site.py
b0a6ae
--- Python-2.7.3/Lib/site.py.lib64	2012-04-09 19:07:31.000000000 -0400
42d74b
+++ Python-2.7.3/Lib/site.py	2013-02-19 13:58:20.447015128 -0500
b0a6ae
@@ -300,12 +300,16 @@ def getsitepackages():
a7ef9c
         if sys.platform in ('os2emx', 'riscos'):
c6247f
             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
a7ef9c
         elif os.sep == '/':
c6247f
+            sitepackages.append(os.path.join(prefix, "lib64",
a7ef9c
+                                        "python" + sys.version[:3],
a7ef9c
+                                        "site-packages"))
c6247f
             sitepackages.append(os.path.join(prefix, "lib",
a7ef9c
                                         "python" + sys.version[:3],
a7ef9c
                                         "site-packages"))
c6247f
             sitepackages.append(os.path.join(prefix, "lib", "site-python"))
a7ef9c
         else:
c6247f
             sitepackages.append(prefix)
c6247f
+            sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
c6247f
             sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
a7ef9c
         if sys.platform == "darwin":
c6247f
             # for framework builds *only* we add the standard Apple
b0a6ae
diff -up Python-2.7.3/Lib/test/test_site.py.lib64 Python-2.7.3/Lib/test/test_site.py
b0a6ae
--- Python-2.7.3/Lib/test/test_site.py.lib64	2012-04-09 19:07:32.000000000 -0400
42d74b
+++ Python-2.7.3/Lib/test/test_site.py	2013-02-19 13:58:20.447015128 -0500
b0a6ae
@@ -241,17 +241,20 @@ class HelperFunctionsTests(unittest.Test
b0a6ae
             self.assertEqual(dirs[2], wanted)
5810c5
         elif os.sep == '/':
b0a6ae
             # OS X non-framwework builds, Linux, FreeBSD, etc
4b97ee
-            self.assertEqual(len(dirs), 2)
b0a6ae
-            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
b0a6ae
+            self.assertEqual(len(dirs), 3)
5810c5
+            wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
4b97ee
                                   'site-packages')
b0a6ae
             self.assertEqual(dirs[0], wanted)
b0a6ae
-            wanted = os.path.join('xoxo', 'lib', 'site-python')
b0a6ae
+            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
b0a6ae
+                                  'site-packages')
b0a6ae
             self.assertEqual(dirs[1], wanted)
b0a6ae
+            wanted = os.path.join('xoxo', 'lib', 'site-python')
b0a6ae
+            self.assertEqual(dirs[2], wanted)
5810c5
         else:
b0a6ae
             # other platforms
b0a6ae
             self.assertEqual(len(dirs), 2)
b0a6ae
             self.assertEqual(dirs[0], 'xoxo')
5810c5
-            wanted = os.path.join('xoxo', 'lib', 'site-packages')
5810c5
+            wanted = os.path.join('xoxo', 'lib64', 'site-packages')
b0a6ae
             self.assertEqual(dirs[1], wanted)
5810c5
 
b0a6ae
 class PthFile(object):
b0a6ae
diff -up Python-2.7.3/Makefile.pre.in.lib64 Python-2.7.3/Makefile.pre.in
42d74b
--- Python-2.7.3/Makefile.pre.in.lib64	2013-02-19 13:58:20.435015131 -0500
42d74b
+++ Python-2.7.3/Makefile.pre.in	2013-02-19 13:58:20.447015128 -0500
b0a6ae
@@ -97,7 +97,7 @@ LIBDIR=		@libdir@
60b7a5
 MANDIR=		@mandir@
60b7a5
 INCLUDEDIR=	@includedir@
60b7a5
 CONFINCLUDEDIR=	$(exec_prefix)/include
60b7a5
-SCRIPTDIR=	$(prefix)/lib
60b7a5
+SCRIPTDIR=	$(prefix)/lib64
60b7a5
 
60b7a5
 # Detailed destination directories
60b7a5
 BINLIBDEST=	$(LIBDIR)/python$(VERSION)
b0a6ae
diff -up Python-2.7.3/Modules/getpath.c.lib64 Python-2.7.3/Modules/getpath.c
b0a6ae
--- Python-2.7.3/Modules/getpath.c.lib64	2012-04-09 19:07:34.000000000 -0400
42d74b
+++ Python-2.7.3/Modules/getpath.c	2013-02-19 13:58:20.448015128 -0500
60b7a5
@@ -117,8 +117,8 @@
60b7a5
 #endif
60b7a5
 
60b7a5
 #ifndef PYTHONPATH
60b7a5
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
60b7a5
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
60b7a5
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
60b7a5
+              EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
60b7a5
 #endif
60b7a5
 
60b7a5
 #ifndef LANDMARK
a7ef9c
@@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
60b7a5
 static char exec_prefix[MAXPATHLEN+1];
60b7a5
 static char progpath[MAXPATHLEN+1];
60b7a5
 static char *module_search_path = NULL;
60b7a5
-static char lib_python[] = "lib/python" VERSION;
60b7a5
+static char lib_python[] = "lib64/python" VERSION;
60b7a5
 
60b7a5
 static void
60b7a5
 reduce(char *dir)
4b97ee
@@ -528,7 +528,7 @@ calculate_path(void)
60b7a5
     }
60b7a5
     else
60b7a5
         strncpy(zip_path, PREFIX, MAXPATHLEN);
60b7a5
-    joinpath(zip_path, "lib/python00.zip");
60b7a5
+    joinpath(zip_path, "lib64/python00.zip");
c6247f
     bufsz = strlen(zip_path);   /* Replace "00" with version */
60b7a5
     zip_path[bufsz - 6] = VERSION[0];
60b7a5
     zip_path[bufsz - 5] = VERSION[2];
4b97ee
@@ -538,7 +538,7 @@ calculate_path(void)
60b7a5
             fprintf(stderr,
60b7a5
                 "Could not find platform dependent libraries <exec_prefix>\n");
60b7a5
         strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
60b7a5
-        joinpath(exec_prefix, "lib/lib-dynload");
60b7a5
+        joinpath(exec_prefix, "lib64/lib-dynload");
60b7a5
     }
60b7a5
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
60b7a5
 
b0a6ae
diff -up Python-2.7.3/Modules/Setup.dist.lib64 Python-2.7.3/Modules/Setup.dist
42d74b
--- Python-2.7.3/Modules/Setup.dist.lib64	2013-02-19 13:58:20.442015131 -0500
42d74b
+++ Python-2.7.3/Modules/Setup.dist	2013-02-19 14:02:25.255998391 -0500
c6247f
@@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
a7ef9c
 # and the subdirectory of PORT where you built it.
42d74b
 DBLIBVER=4.8
a7ef9c
 DBINC=/usr/include/db4
a7ef9c
-DBLIB=/usr/lib
a7ef9c
+DBLIB=/usr/lib64
a7ef9c
 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
a7ef9c
 
a7ef9c
 # Historical Berkeley DB 1.85
c6247f
@@ -459,7 +459,7 @@ cPickle cPickle.c
a7ef9c
 # Andrew Kuchling's zlib module.
a7ef9c
 # This require zlib 1.1.3 (or later).
a7ef9c
 # See http://www.gzip.org/zlib/
a7ef9c
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
a7ef9c
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
a7ef9c
 
a7ef9c
 # Interface to the Expat XML parser
a7ef9c
 #
b0a6ae
diff -up Python-2.7.3/setup.py.lib64 Python-2.7.3/setup.py
b0a6ae
--- Python-2.7.3/setup.py.lib64	2012-04-09 19:07:36.000000000 -0400
42d74b
+++ Python-2.7.3/setup.py	2013-02-19 13:58:20.449015129 -0500
b0a6ae
@@ -369,7 +369,7 @@ class PyBuildExt(build_ext):
a7ef9c
 
a7ef9c
     def detect_modules(self):
a7ef9c
         # Ensure that /usr/local is always used
a7ef9c
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
a7ef9c
+        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
a7ef9c
         add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
b0a6ae
         self.add_multiarch_paths()
a7ef9c
 
b0a6ae
@@ -677,11 +677,11 @@ class PyBuildExt(build_ext):
c6247f
             elif curses_library:
c6247f
                 readline_libs.append(curses_library)
a7ef9c
             elif self.compiler.find_library_file(lib_dirs +
c6247f
-                                                     ['/usr/lib/termcap'],
c6247f
+                                                     ['/usr/lib64/termcap'],
c6247f
                                                      'termcap'):
a7ef9c
                 readline_libs.append('termcap')
a7ef9c
             exts.append( Extension('readline', ['readline.c'],
a7ef9c
-                                   library_dirs=['/usr/lib/termcap'],
a7ef9c
+                                   library_dirs=['/usr/lib64/termcap'],
a7ef9c
                                    extra_link_args=readline_extra_link_args,
a7ef9c
                                    libraries=readline_libs) )
a7ef9c
         else:
b0a6ae
@@ -715,8 +715,8 @@ class PyBuildExt(build_ext):
a7ef9c
             if krb5_h:
a7ef9c
                 ssl_incs += krb5_h
a7ef9c
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
a7ef9c
-                                     ['/usr/local/ssl/lib',
a7ef9c
-                                      '/usr/contrib/ssl/lib/'
a7ef9c
+                                     ['/usr/local/ssl/lib64',
a7ef9c
+                                      '/usr/contrib/ssl/lib64/'
a7ef9c
                                      ] )
a7ef9c
 
a7ef9c
         if (ssl_incs is not None and