churchyard / rpms / python2

Forked from rpms/python2 2 years ago
Clone
31c533
diff --git a/Lib/distutils/command/install.py b/Lib/distutils/command/install.py
31c533
index b9f1c6c..7b23714 100644
31c533
--- a/Lib/distutils/command/install.py
31c533
+++ b/Lib/distutils/command/install.py
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',
31c533
diff --git a/Lib/distutils/sysconfig.py b/Lib/distutils/sysconfig.py
75a070
index 031f809..ec5d584 100644
31c533
--- a/Lib/distutils/sysconfig.py
31c533
+++ b/Lib/distutils/sysconfig.py
75a070
@@ -120,8 +120,12 @@ def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
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:
31c533
diff --git a/Lib/site.py b/Lib/site.py
202761
index c360802..868b7cb 100644
31c533
--- a/Lib/site.py
31c533
+++ b/Lib/site.py
7455bc
@@ -288,12 +288,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"))
202761
     return sitepackages
202761
 
31c533
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
75a070
index b4384ee..349f688 100644
31c533
--- a/Lib/test/test_site.py
31c533
+++ b/Lib/test/test_site.py
75a070
@@ -254,17 +254,20 @@ class HelperFunctionsTests(unittest.TestCase):
202761
             self.assertEqual(dirs[0], wanted)
5810c5
         elif os.sep == '/':
202761
             # OS X, 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],
31c533
+                                   '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
 
75a070
     def test_no_home_directory(self):
31c533
diff --git a/Makefile.pre.in b/Makefile.pre.in
75a070
index 4f59dd3..877698c 100644
31c533
--- a/Makefile.pre.in
31c533
+++ b/Makefile.pre.in
75a070
@@ -110,7 +110,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)
31c533
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
75a070
index 2cf35a9..c4c88cb 100644
31c533
--- a/Modules/Setup.dist
31c533
+++ b/Modules/Setup.dist
75a070
@@ -231,7 +231,7 @@ crypt cryptmodule.c # -lcrypt	# crypt(3); needs -lcrypt on some systems
3056bf
 # Some more UNIX dependent modules -- off by default, since these
3056bf
 # are not supported by all UNIX systems:
3056bf
 
3056bf
-nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib/nsl
3056bf
+nis nismodule.c -lnsl -ltirpc -I/usr/include/tirpc -I/usr/include/nsl -L/usr/lib64/nsl
3056bf
 termios termios.c	# Steen Lumholt's termios module
3056bf
 resource resource.c	# Jeremy Hylton's rlimit interface
3056bf
 
7455bc
@@ -416,7 +416,7 @@ gdbm gdbmmodule.c -lgdbm
7455bc
 # Edit the variables DB and DBLIBVERto point to the db top directory
7455bc
 # and the subdirectory of PORT where you built it.
7455bc
 DBINC=/usr/include/libdb
7455bc
-DBLIB=/usr/lib
7455bc
+DBLIB=/usr/lib64
7455bc
 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb
7455bc
 
7455bc
 # Historical Berkeley DB 1.85
7455bc
@@ -462,7 +462,7 @@ cPickle cPickle.c
7455bc
 # Andrew Kuchling's zlib module.
7455bc
 # This require zlib 1.1.3 (or later).
7455bc
 # See http://www.gzip.org/zlib/
7455bc
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
7455bc
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
7455bc
 
7455bc
 # Interface to the Expat XML parser
75a070
 # More information on Expat can be found at www.libexpat.org.
31c533
diff --git a/Modules/getpath.c b/Modules/getpath.c
202761
index fd33a01..c5c86fd 100644
31c533
--- a/Modules/getpath.c
31c533
+++ b/Modules/getpath.c
31c533
@@ -108,7 +108,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)
202761
@@ -548,7 +548,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
 
31c533
diff --git a/setup.py b/setup.py
75a070
index 0288a6b..7905f6f 100644
31c533
--- a/setup.py
31c533
+++ b/setup.py
31c533
@@ -456,7 +456,7 @@ class PyBuildExt(build_ext):
a7ef9c
     def detect_modules(self):
a7ef9c
         # Ensure that /usr/local is always used
7455bc
         if not cross_compiling:
7455bc
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
7455bc
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
7455bc
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
7455bc
         if cross_compiling:
7455bc
             self.add_gcc_paths()
31c533
@@ -782,11 +782,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:
31c533
@@ -821,8 +821,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