torsava / rpms / python3

Forked from rpms/python3 2 years ago
Clone
a3483f
diff -ur Python-3.1.1.orig/Lib/distutils/command/install.py Python-3.1.1/Lib/distutils/command/install.py
a3483f
--- Python-3.1.1.orig/Lib/distutils/command/install.py	2009-09-24 15:28:57.000000000 -0600
a3483f
+++ Python-3.1.1/Lib/distutils/command/install.py	2009-09-24 15:34:18.000000000 -0600
a3483f
@@ -47,14 +47,14 @@
a3483f
 INSTALL_SCHEMES = {
a3483f
     'unix_prefix': {
a3483f
         'purelib': '$base/lib/python$py_version_short/site-packages',
a3483f
-        'platlib': '$platbase/lib/python$py_version_short/site-packages',
a3483f
+        'platlib': '$platbase/lib64/python$py_version_short/site-packages',
a3483f
         'headers': '$base/include/python$py_version_short/$dist_name',
a3483f
         'scripts': '$base/bin',
a3483f
         'data'   : '$base',
a3483f
         },
a3483f
     'unix_home': {
a3483f
         'purelib': '$base/lib/python',
a3483f
-        'platlib': '$base/lib/python',
a3483f
+        'platlib': '$base/lib64/python',
a3483f
         'headers': '$base/include/python/$dist_name',
a3483f
         'scripts': '$base/bin',
a3483f
         'data'   : '$base',
a3483f
diff -ur Python-3.1.1.orig/Lib/distutils/sysconfig.py Python-3.1.1/Lib/distutils/sysconfig.py
a3483f
--- Python-3.1.1.orig/Lib/distutils/sysconfig.py	2009-09-24 15:29:00.000000000 -0600
a3483f
+++ Python-3.1.1/Lib/distutils/sysconfig.py	2009-09-24 15:34:18.000000000 -0600
a3483f
@@ -117,8 +117,12 @@
a3483f
         prefix = plat_specific and EXEC_PREFIX or PREFIX
a3483f
 
a3483f
     if os.name == "posix":
a3483f
+        if plat_specific or standard_lib:
a3483f
+            lib = "lib64"
a3483f
+        else:
a3483f
+            lib = "lib"
a3483f
         libpython = os.path.join(prefix,
a3483f
-                                 "lib", "python" + get_python_version())
a3483f
+                                 lib, "python" + get_python_version())
a3483f
         if standard_lib:
a3483f
             return libpython
a3483f
         else:
a3483f
diff -ur Python-3.1.1.orig/Lib/site.py Python-3.1.1/Lib/site.py
a3483f
--- Python-3.1.1.orig/Lib/site.py	2009-09-24 15:28:56.000000000 -0600
a3483f
+++ Python-3.1.1/Lib/site.py	2009-09-24 15:34:18.000000000 -0600
a3483f
@@ -258,12 +258,16 @@
a3483f
         if sys.platform in ('os2emx', 'riscos'):
a3483f
             sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
a3483f
         elif os.sep == '/':
a3483f
+            sitedirs.append(os.path.join(prefix, "lib64",
a3483f
+                                        "python" + sys.version[:3],
a3483f
+                                        "site-packages"))
a3483f
             sitedirs.append(os.path.join(prefix, "lib",
a3483f
                                         "python" + sys.version[:3],
a3483f
                                         "site-packages"))
a3483f
             sitedirs.append(os.path.join(prefix, "lib", "site-python"))
a3483f
         else:
a3483f
             sitedirs.append(prefix)
a3483f
+            sitedirs.append(os.path.join(prefix, "lib64", "site-packages"))
a3483f
             sitedirs.append(os.path.join(prefix, "lib", "site-packages"))
a3483f
 
a3483f
         if sys.platform == "darwin":
a3483f
diff -ur Python-3.1.1.orig/Makefile.pre.in Python-3.1.1/Makefile.pre.in
a3483f
--- Python-3.1.1.orig/Makefile.pre.in	2009-09-24 15:26:58.000000000 -0600
a3483f
+++ Python-3.1.1/Makefile.pre.in	2009-09-24 15:34:18.000000000 -0600
a3483f
@@ -90,11 +90,11 @@
a3483f
 
a3483f
 # Expanded directories
a3483f
 BINDIR=		$(exec_prefix)/bin
a3483f
-LIBDIR=		$(exec_prefix)/lib
a3483f
+LIBDIR=		$(exec_prefix)/lib64
a3483f
 MANDIR=		@mandir@
a3483f
 INCLUDEDIR=	@includedir@
a3483f
 CONFINCLUDEDIR=	$(exec_prefix)/include
a3483f
-SCRIPTDIR=	$(prefix)/lib
a3483f
+SCRIPTDIR=	$(prefix)/lib64
a3483f
 
a3483f
 # Detailed destination directories
a3483f
 BINLIBDEST=	$(LIBDIR)/python$(VERSION)
a3483f
diff -ur Python-3.1.1.orig/Modules/getpath.c Python-3.1.1/Modules/getpath.c
a3483f
--- Python-3.1.1.orig/Modules/getpath.c	2009-09-24 15:27:15.000000000 -0600
a3483f
+++ Python-3.1.1/Modules/getpath.c	2009-09-24 15:36:58.000000000 -0600
a3483f
@@ -117,8 +117,8 @@
a3483f
 #endif
a3483f
 
a3483f
 #ifndef PYTHONPATH
a3483f
-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
a3483f
-              EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
a3483f
+#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
a3483f
+              EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
a3483f
 #endif
a3483f
 
a3483f
 #ifndef LANDMARK
a3483f
@@ -129,7 +129,7 @@
a3483f
 static wchar_t exec_prefix[MAXPATHLEN+1];
a3483f
 static wchar_t progpath[MAXPATHLEN+1];
a3483f
 static wchar_t *module_search_path = NULL;
a3483f
-static wchar_t lib_python[] = L"lib/python" VERSION;
a3483f
+static wchar_t lib_python[] = L"lib64/python" VERSION;
a3483f
 
a3483f
 /* In principle, this should use HAVE__WSTAT, and _wstat
a3483f
    should be detected by autoconf. However, no current
a3483f
@@ -603,7 +603,7 @@
a3483f
     }
a3483f
     else
a3483f
         wcsncpy(zip_path, L"" PREFIX, MAXPATHLEN);
a3483f
-    joinpath(zip_path, L"lib/python00.zip");
a3483f
+    joinpath(zip_path, L"lib64/python00.zip");
a3483f
     bufsz = wcslen(zip_path);	/* Replace "00" with version */
a3483f
     zip_path[bufsz - 6] = VERSION[0];
a3483f
     zip_path[bufsz - 5] = VERSION[2];
a3483f
@@ -613,7 +613,7 @@
a3483f
             fprintf(stderr,
a3483f
                 "Could not find platform dependent libraries <exec_prefix>\n");
a3483f
         wcsncpy(exec_prefix, L"" EXEC_PREFIX, MAXPATHLEN);
a3483f
-        joinpath(exec_prefix, L"lib/lib-dynload");
a3483f
+        joinpath(exec_prefix, L"lib64/lib-dynload");
a3483f
     }
a3483f
     /* If we found EXEC_PREFIX do *not* reduce it!  (Yet.) */
a3483f
 
a3483f
diff -ur Python-3.1.1.orig/Modules/Setup.dist Python-3.1.1/Modules/Setup.dist
a3483f
--- Python-3.1.1.orig/Modules/Setup.dist	2009-09-24 15:27:30.000000000 -0600
a3483f
+++ Python-3.1.1/Modules/Setup.dist	2009-09-24 15:45:49.000000000 -0600
a3483f
@@ -351,7 +351,7 @@
a3483f
 # Andrew Kuchling's zlib module.
a3483f
 # This require zlib 1.1.3 (or later).
a3483f
 # See http://www.gzip.org/zlib/
a3483f
-zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
a3483f
+zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
a3483f
 
a3483f
 # Interface to the Expat XML parser
a3483f
 #
a3483f
diff -ur Python-3.1.1.orig/setup.py Python-3.1.1/setup.py
a3483f
--- Python-3.1.1.orig/setup.py	2009-09-24 15:26:58.000000000 -0600
a3483f
+++ Python-3.1.1/setup.py	2009-09-24 15:34:18.000000000 -0600
a3483f
@@ -295,7 +295,7 @@
a3483f
 
a3483f
     def detect_modules(self):
a3483f
         # Ensure that /usr/local is always used
a3483f
-        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
a3483f
+        add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
a3483f
         add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
a3483f
 
a3483f
         # Add paths specified in the environment variables LDFLAGS and
a3483f
@@ -522,11 +522,11 @@
a3483f
             elif self.compiler.find_library_file(lib_dirs, 'curses'):
a3483f
                 readline_libs.append('curses')
a3483f
             elif self.compiler.find_library_file(lib_dirs +
a3483f
-                                               ['/usr/lib/termcap'],
a3483f
+                                               ['/usr/lib64/termcap'],
a3483f
                                                'termcap'):
a3483f
                 readline_libs.append('termcap')
a3483f
             exts.append( Extension('readline', ['readline.c'],
a3483f
-                                   library_dirs=['/usr/lib/termcap'],
a3483f
+                                   library_dirs=['/usr/lib64/termcap'],
a3483f
                                    extra_link_args=readline_extra_link_args,
a3483f
                                    libraries=readline_libs) )
a3483f
         else:
a3483f
@@ -563,8 +563,8 @@
a3483f
             if krb5_h:
a3483f
                 ssl_incs += krb5_h
a3483f
         ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
a3483f
-                                     ['/usr/local/ssl/lib',
a3483f
-                                      '/usr/contrib/ssl/lib/'
a3483f
+                                     ['/usr/local/ssl/lib64',
a3483f
+                                      '/usr/contrib/ssl/lib64/'
a3483f
                                      ] )
a3483f
 
a3483f
         if (ssl_incs is not None and