torsava / rpms / python3

Forked from rpms/python3 2 years ago
Clone
62d720
diff -up cpython-59223da36dec/Lib/distutils/command/install.py.lib64 cpython-59223da36dec/Lib/distutils/command/install.py
62d720
--- cpython-59223da36dec/Lib/distutils/command/install.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Lib/distutils/command/install.py	2012-08-07 16:41:00.573477549 -0400
288566
@@ -45,14 +45,14 @@ else:
5080ff
 INSTALL_SCHEMES = {
5080ff
     'unix_prefix': {
5080ff
         'purelib': '$base/lib/python$py_version_short/site-packages',
5080ff
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
5080ff
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
5080ff
         'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
5080ff
         'scripts': '$base/bin',
5080ff
         'data'   : '$base',
5080ff
         },
5080ff
     'unix_home': {
5080ff
         'purelib': '$base/lib/python',
5080ff
-        'platlib': '$base/lib/python',
5080ff
+        'platlib': '$base/lib64/python',
5080ff
         'headers': '$base/include/python/$dist_name',
5080ff
         'scripts': '$base/bin',
5080ff
         'data'   : '$base',
62d720
diff -up cpython-59223da36dec/Lib/distutils/sysconfig.py.lib64 cpython-59223da36dec/Lib/distutils/sysconfig.py
62d720
--- cpython-59223da36dec/Lib/distutils/sysconfig.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Lib/distutils/sysconfig.py	2012-08-07 16:41:00.573477549 -0400
62d720
@@ -139,8 +139,12 @@ def get_python_lib(plat_specific=0, stan
1c94c1
             prefix = plat_specific and EXEC_PREFIX or PREFIX
5080ff
 
5080ff
     if os.name == "posix":
5080ff
+        if plat_specific or standard_lib:
5080ff
+            lib = "lib64"
5080ff
+        else:
5080ff
+            lib = "lib"
5080ff
         libpython = os.path.join(prefix,
5080ff
-                                 "lib", "python" + get_python_version())
5080ff
+                                 lib, "python" + get_python_version())
5080ff
         if standard_lib:
5080ff
             return libpython
5080ff
         else:
62d720
diff -up cpython-59223da36dec/Lib/site.py.lib64 cpython-59223da36dec/Lib/site.py
62d720
--- cpython-59223da36dec/Lib/site.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Lib/site.py	2012-08-07 16:41:00.573477549 -0400
1c94c1
@@ -303,12 +303,16 @@ def getsitepackages(prefixes=None):
5080ff
         if sys.platform in ('os2emx', 'riscos'):
5080ff
             sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
5080ff
         elif os.sep == '/':
5080ff
+            sitepackages.append(os.path.join(prefix, "lib64",
5080ff
+                                        "python" + sys.version[:3],
5080ff
+                                        "site-packages"))
5080ff
             sitepackages.append(os.path.join(prefix, "lib",
5080ff
                                         "python" + sys.version[:3],
5080ff
                                         "site-packages"))
5080ff
             sitepackages.append(os.path.join(prefix, "lib", "site-python"))
5080ff
         else:
5080ff
             sitepackages.append(prefix)
5080ff
+            sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
5080ff
             sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
5080ff
         if sys.platform == "darwin":
5080ff
             # for framework builds *only* we add the standard Apple
62d720
diff -up cpython-59223da36dec/Lib/sysconfig.py.lib64 cpython-59223da36dec/Lib/sysconfig.py
62d720
--- cpython-59223da36dec/Lib/sysconfig.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Lib/sysconfig.py	2012-08-07 16:41:00.574477549 -0400
5080ff
@@ -21,10 +21,10 @@ __all__ = [
5080ff
 
5080ff
 _INSTALL_SCHEMES = {
5080ff
     'posix_prefix': {
1c94c1
-        'stdlib': '{installed_base}/lib/python{py_version_short}',
5080ff
-        'platstdlib': '{platbase}/lib/python{py_version_short}',
1c94c1
+        'stdlib': '{installed_base}/lib64/python{py_version_short}',
5080ff
+        'platstdlib': '{platbase}/lib64/python{py_version_short}',
5080ff
         'purelib': '{base}/lib/python{py_version_short}/site-packages',
5080ff
-        'platlib': '{platbase}/lib/python{py_version_short}/site-packages',
5080ff
+        'platlib': '{platbase}/lib64/python{py_version_short}/site-packages',
5080ff
         'include':
1c94c1
             '{installed_base}/include/python{py_version_short}{abiflags}',
5080ff
         'platinclude':
5080ff
@@ -81,10 +81,10 @@ _INSTALL_SCHEMES = {
1c94c1
         'data': '{userbase}',
5080ff
         },
5080ff
     'posix_user': {
5080ff
-        'stdlib': '{userbase}/lib/python{py_version_short}',
5080ff
-        'platstdlib': '{userbase}/lib/python{py_version_short}',
5080ff
+        'stdlib': '{userbase}/lib64/python{py_version_short}',
5080ff
+        'platstdlib': '{userbase}/lib64/python{py_version_short}',
5080ff
         'purelib': '{userbase}/lib/python{py_version_short}/site-packages',
5080ff
-        'platlib': '{userbase}/lib/python{py_version_short}/site-packages',
5080ff
+        'platlib': '{userbase}/lib64/python{py_version_short}/site-packages',
5080ff
         'include': '{userbase}/include/python{py_version_short}',
5080ff
         'scripts': '{userbase}/bin',
1c94c1
         'data': '{userbase}',
62d720
diff -up cpython-59223da36dec/Lib/test/test_site.py.lib64 cpython-59223da36dec/Lib/test/test_site.py
62d720
--- cpython-59223da36dec/Lib/test/test_site.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Lib/test/test_site.py	2012-08-07 16:41:00.574477549 -0400
1c94c1
@@ -239,12 +239,15 @@ class HelperFunctionsTests(unittest.Test
288566
             self.assertEqual(dirs[2], wanted)
5080ff
         elif os.sep == '/':
288566
             # OS X non-framwework builds, Linux, FreeBSD, etc
5080ff
-            self.assertEqual(len(dirs), 2)
5080ff
-            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
5080ff
+            self.assertEqual(len(dirs), 3)
5080ff
+            wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
5080ff
                                   'site-packages')
5080ff
             self.assertEqual(dirs[0], wanted)
5080ff
-            wanted = os.path.join('xoxo', 'lib', 'site-python')
5080ff
+            wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
5080ff
+                                  'site-packages')
5080ff
             self.assertEqual(dirs[1], wanted)
5080ff
+            wanted = os.path.join('xoxo', 'lib', 'site-python')
5080ff
+            self.assertEqual(dirs[2], wanted)
5080ff
         else:
288566
             # other platforms
5080ff
             self.assertEqual(len(dirs), 2)
62d720
diff -up cpython-59223da36dec/Makefile.pre.in.lib64 cpython-59223da36dec/Makefile.pre.in
62d720
--- cpython-59223da36dec/Makefile.pre.in.lib64	2012-08-07 16:41:00.557477550 -0400
62d720
+++ cpython-59223da36dec/Makefile.pre.in	2012-08-07 16:41:00.575477549 -0400
62d720
@@ -108,7 +108,7 @@ LIBDIR=		@libdir@
5080ff
 MANDIR=		@mandir@
5080ff
 INCLUDEDIR=	@includedir@
5080ff
 CONFINCLUDEDIR=	$(exec_prefix)/include
5080ff
-SCRIPTDIR=	$(prefix)/lib
5080ff
+SCRIPTDIR=	$(prefix)/lib64
5080ff
 ABIFLAGS=	@ABIFLAGS@
5080ff
 
5080ff
 # Detailed destination directories
62d720
diff -up cpython-59223da36dec/Modules/getpath.c.lib64 cpython-59223da36dec/Modules/getpath.c
62d720
--- cpython-59223da36dec/Modules/getpath.c.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/Modules/getpath.c	2012-08-07 16:41:00.575477549 -0400
5080ff
@@ -122,8 +122,8 @@
5080ff
 #endif
5080ff
 
5080ff
 #ifndef PYTHONPATH
5080ff
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
5080ff
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
5080ff
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
5080ff
+              EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
5080ff
 #endif
5080ff
 
5080ff
 #ifndef LANDMARK
cce760
@@ -135,7 +135,7 @@ static wchar_t exec_prefix[MAXPATHLEN+1]
5080ff
 static wchar_t progpath[MAXPATHLEN+1];
5080ff
 static wchar_t *module_search_path = NULL;
cce760
 static int module_search_path_malloced = 0;
5080ff
-static wchar_t *lib_python = L"lib/python" VERSION;
5080ff
+static wchar_t *lib_python = L"lib64/python" VERSION;
5080ff
 
5080ff
 static void
5080ff
 reduce(wchar_t *dir)
62d720
@@ -677,7 +677,7 @@ calculate_path(void)
5080ff
     }
5080ff
     else
5080ff
         wcsncpy(zip_path, _prefix, MAXPATHLEN);
5080ff
-    joinpath(zip_path, L"lib/python00.zip");
5080ff
+    joinpath(zip_path, L"lib64/python00.zip");
5080ff
     bufsz = wcslen(zip_path);   /* Replace "00" with version */
5080ff
     zip_path[bufsz - 6] = VERSION[0];
5080ff
     zip_path[bufsz - 5] = VERSION[2];
62d720
@@ -687,7 +687,7 @@ calculate_path(void)
5080ff
             fprintf(stderr,
5080ff
                 "Could not find platform dependent libraries <exec_prefix>\n");
5080ff
         wcsncpy(exec_prefix, _exec_prefix, MAXPATHLEN);
5080ff
-        joinpath(exec_prefix, L"lib/lib-dynload");
5080ff
+        joinpath(exec_prefix, L"lib64/lib-dynload");
5080ff
     }
5080ff
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
5080ff
 
62d720
diff -up cpython-59223da36dec/setup.py.lib64 cpython-59223da36dec/setup.py
62d720
--- cpython-59223da36dec/setup.py.lib64	2012-08-07 06:10:57.000000000 -0400
62d720
+++ cpython-59223da36dec/setup.py	2012-08-07 16:41:32.153475390 -0400
62d720
@@ -438,7 +438,7 @@ class PyBuildExt(build_ext):
5080ff
         # directories (i.e. '.' and 'Include') must be first.  See issue
5080ff
         # 10520.
62d720
         if not cross_compiling:
62d720
-            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
62d720
+            add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
62d720
             add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
62d720
         # only change this for cross builds for 3.3, issues on Mageia
62d720
         if cross_compiling:
62d720
@@ -708,11 +708,11 @@ class PyBuildExt(build_ext):
5080ff
             elif curses_library:
5080ff
                 readline_libs.append(curses_library)
5080ff
             elif self.compiler.find_library_file(lib_dirs +
5080ff
-                                                     ['/usr/lib/termcap'],
5080ff
+                                                     ['/usr/lib64/termcap'],
5080ff
                                                      'termcap'):
5080ff
                 readline_libs.append('termcap')
5080ff
             exts.append( Extension('readline', ['readline.c'],
5080ff
-                                   library_dirs=['/usr/lib/termcap'],
5080ff
+                                   library_dirs=['/usr/lib64/termcap'],
5080ff
                                    extra_link_args=readline_extra_link_args,
5080ff
                                    libraries=readline_libs) )
5080ff
         else:
62d720
@@ -749,8 +749,8 @@ class PyBuildExt(build_ext):
5080ff
             if krb5_h:
5080ff
                 ssl_incs += krb5_h
5080ff
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
5080ff
-                                     ['/usr/local/ssl/lib',
5080ff
-                                      '/usr/contrib/ssl/lib/'
5080ff
+                                     ['/usr/local/ssl/lib64',
5080ff
+                                      '/usr/contrib/ssl/lib64/'
5080ff
                                      ] )
5080ff
 
5080ff
         if (ssl_incs is not None and