1 diff -up Python-2.7.1/Lib/distutils/command/install.py.lib64 Python-2.7.1/Lib/distutils/command/install.py
2 --- Python-2.7.1/Lib/distutils/command/install.py.lib64 2010-05-05 15:09:31.000000000 -0400
3 +++ Python-2.7.1/Lib/distutils/command/install.py 2010-12-23 15:51:19.422062062 -0500
4 @@ -42,14 +42,14 @@ else:
7 'purelib': '$base/lib/python$py_version_short/site-packages',
8 - 'platlib': '$platbase/lib/python$py_version_short/site-packages',
9 + 'platlib': '$platbase/lib64/python$py_version_short/site-packages',
10 'headers': '$base/include/python$py_version_short/$dist_name',
11 'scripts': '$base/bin',
15 'purelib': '$base/lib/python',
16 - 'platlib': '$base/lib/python',
17 + 'platlib': '$base/lib64/python',
18 'headers': '$base/include/python/$dist_name',
19 'scripts': '$base/bin',
21 diff -up Python-2.7.1/Lib/distutils/sysconfig.py.lib64 Python-2.7.1/Lib/distutils/sysconfig.py
22 --- Python-2.7.1/Lib/distutils/sysconfig.py.lib64 2010-11-06 10:16:30.000000000 -0400
23 +++ Python-2.7.1/Lib/distutils/sysconfig.py 2010-12-23 15:51:19.423063652 -0500
24 @@ -114,8 +114,12 @@ def get_python_lib(plat_specific=0, stan
25 prefix = plat_specific and EXEC_PREFIX or PREFIX
27 if os.name == "posix":
28 + if plat_specific or standard_lib:
32 libpython = os.path.join(prefix,
33 - "lib", "python" + get_python_version())
34 + lib, "python" + get_python_version())
38 diff -up Python-2.7.1/Lib/site.py.lib64 Python-2.7.1/Lib/site.py
39 --- Python-2.7.1/Lib/site.py.lib64 2010-10-12 18:53:51.000000000 -0400
40 +++ Python-2.7.1/Lib/site.py 2010-12-23 15:51:19.424063606 -0500
41 @@ -290,12 +290,16 @@ def getsitepackages():
42 if sys.platform in ('os2emx', 'riscos'):
43 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
45 + sitepackages.append(os.path.join(prefix, "lib64",
46 + "python" + sys.version[:3],
48 sitepackages.append(os.path.join(prefix, "lib",
49 "python" + sys.version[:3],
51 sitepackages.append(os.path.join(prefix, "lib", "site-python"))
53 sitepackages.append(prefix)
54 + sitepackages.append(os.path.join(prefix, "lib64", "site-packages"))
55 sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
56 if sys.platform == "darwin":
57 # for framework builds *only* we add the standard Apple
58 diff -up Python-2.7.1/Lib/test/test_site.py.lib64 Python-2.7.1/Lib/test/test_site.py
59 --- Python-2.7.1/Lib/test/test_site.py.lib64 2010-11-21 08:34:58.000000000 -0500
60 +++ Python-2.7.1/Lib/test/test_site.py 2010-12-23 15:55:19.782935931 -0500
62 self.assertEqual(dirs[2], wanted)
64 # OS X non-framwework builds, Linux, FreeBSD, etc
65 - self.assertEqual(len(dirs), 2)
66 + self.assertEquals(len(dirs), 3)
67 + wanted = os.path.join('xoxo', 'lib64', 'python' + sys.version[:3],
69 + self.assertEquals(dirs[0], wanted)
70 wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3],
72 - self.assertEqual(dirs[0], wanted)
73 + self.assertEquals(dirs[1], wanted)
74 wanted = os.path.join('xoxo', 'lib', 'site-python')
75 - self.assertEqual(dirs[1], wanted)
76 + self.assertEquals(dirs[2], wanted)
79 - self.assertEqual(len(dirs), 2)
80 - self.assertEqual(dirs[0], 'xoxo')
81 - wanted = os.path.join('xoxo', 'lib', 'site-packages')
82 - self.assertEqual(dirs[1], wanted)
83 + self.assertEquals(len(dirs), 2)
84 + self.assertEquals(dirs[0], 'xoxo')
85 + wanted = os.path.join('xoxo', 'lib64', 'site-packages')
86 + self.assertEquals(dirs[1], wanted)
89 class PthFile(object):
90 """Helper class for handling testing of .pth files"""
91 diff -up Python-2.7.1/Makefile.pre.in.lib64 Python-2.7.1/Makefile.pre.in
92 --- Python-2.7.1/Makefile.pre.in.lib64 2010-12-23 15:51:19.407063264 -0500
93 +++ Python-2.7.1/Makefile.pre.in 2010-12-23 15:51:19.426063917 -0500
94 @@ -94,7 +94,7 @@ LIBDIR= @libdir@
96 INCLUDEDIR= @includedir@
97 CONFINCLUDEDIR= $(exec_prefix)/include
98 -SCRIPTDIR= $(prefix)/lib
99 +SCRIPTDIR= $(prefix)/lib64
101 # Detailed destination directories
102 BINLIBDEST= $(LIBDIR)/python$(VERSION)
103 diff -up Python-2.7.1/Modules/getpath.c.lib64 Python-2.7.1/Modules/getpath.c
104 --- Python-2.7.1/Modules/getpath.c.lib64 2010-10-07 19:37:08.000000000 -0400
105 +++ Python-2.7.1/Modules/getpath.c 2010-12-23 15:51:19.427063291 -0500
110 -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
111 - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
112 +#define PYTHONPATH PREFIX "/lib64/python" VERSION ":" \
113 + EXEC_PREFIX "/lib64/python" VERSION "/lib-dynload"
117 @@ -129,7 +129,7 @@ static char prefix[MAXPATHLEN+1];
118 static char exec_prefix[MAXPATHLEN+1];
119 static char progpath[MAXPATHLEN+1];
120 static char *module_search_path = NULL;
121 -static char lib_python[] = "lib/python" VERSION;
122 +static char lib_python[] = "lib64/python" VERSION;
126 @@ -528,7 +528,7 @@ calculate_path(void)
129 strncpy(zip_path, PREFIX, MAXPATHLEN);
130 - joinpath(zip_path, "lib/python00.zip");
131 + joinpath(zip_path, "lib64/python00.zip");
132 bufsz = strlen(zip_path); /* Replace "00" with version */
133 zip_path[bufsz - 6] = VERSION[0];
134 zip_path[bufsz - 5] = VERSION[2];
135 @@ -538,7 +538,7 @@ calculate_path(void)
137 "Could not find platform dependent libraries <exec_prefix>\n");
138 strncpy(exec_prefix, EXEC_PREFIX, MAXPATHLEN);
139 - joinpath(exec_prefix, "lib/lib-dynload");
140 + joinpath(exec_prefix, "lib64/lib-dynload");
142 /* If we found EXEC_PREFIX do *not* reduce it! (Yet.) */
144 diff -up Python-2.7.1/Modules/Setup.dist.lib64 Python-2.7.1/Modules/Setup.dist
145 --- Python-2.7.1/Modules/Setup.dist.lib64 2010-12-23 15:51:19.400104130 -0500
146 +++ Python-2.7.1/Modules/Setup.dist 2010-12-23 15:51:19.427063291 -0500
147 @@ -413,7 +413,7 @@ gdbm gdbmmodule.c -lgdbm
148 # and the subdirectory of PORT where you built it.
150 DBINC=/usr/include/db4
153 _bsddb _bsddb.c -I$(DBINC) -L$(DBLIB) -ldb-$(DBLIBVER)
155 # Historical Berkeley DB 1.85
156 @@ -459,7 +459,7 @@ cPickle cPickle.c
157 # Andrew Kuchling's zlib module.
158 # This require zlib 1.1.3 (or later).
159 # See http://www.gzip.org/zlib/
160 -zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib -lz
161 +zlib zlibmodule.c -I$(prefix)/include -L$(exec_prefix)/lib64 -lz
163 # Interface to the Expat XML parser
165 diff -up Python-2.7.1/setup.py.lib64 Python-2.7.1/setup.py
166 --- Python-2.7.1/setup.py.lib64 2010-10-31 12:40:21.000000000 -0400
167 +++ Python-2.7.1/setup.py 2010-12-23 15:51:19.428064129 -0500
168 @@ -347,7 +347,7 @@ class PyBuildExt(build_ext):
170 def detect_modules(self):
171 # Ensure that /usr/local is always used
172 - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
173 + add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib64')
174 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
176 # Add paths specified in the environment variables LDFLAGS and
177 @@ -654,11 +654,11 @@ class PyBuildExt(build_ext):
179 readline_libs.append(curses_library)
180 elif self.compiler.find_library_file(lib_dirs +
181 - ['/usr/lib/termcap'],
182 + ['/usr/lib64/termcap'],
184 readline_libs.append('termcap')
185 exts.append( Extension('readline', ['readline.c'],
186 - library_dirs=['/usr/lib/termcap'],
187 + library_dirs=['/usr/lib64/termcap'],
188 extra_link_args=readline_extra_link_args,
189 libraries=readline_libs) )
191 @@ -692,8 +692,8 @@ class PyBuildExt(build_ext):
194 ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
195 - ['/usr/local/ssl/lib',
196 - '/usr/contrib/ssl/lib/'
197 + ['/usr/local/ssl/lib64',
198 + '/usr/contrib/ssl/lib64/'
201 if (ssl_incs is not None and