]>
Commit | Line | Data |
---|---|---|
1e4c5e1c AM |
1 | --- Python-2.5b2.orig/configure.ac 2006-07-06 11:13:35.000000000 +0100 |
2 | +++ Python-2.5b2/configure.ac 2006-07-12 17:42:51.000000000 +0100 | |
c2623236 | 3 | @@ -503,6 +503,44 @@ |
ca37566f | 4 | ;; |
5 | esac | |
6 | ||
7 | +AC_SUBST(ARCH) | |
8 | +AC_MSG_CHECKING(ARCH) | |
9 | +ARCH=`uname -m` | |
10 | +case $ARCH in | |
11 | +i?86) ARCH=i386;; | |
12 | +esac | |
13 | +AC_MSG_RESULT($ARCH) | |
14 | + | |
15 | +AC_SUBST(LIB) | |
16 | +AC_MSG_CHECKING(LIB) | |
17 | +case $ac_sys_system in | |
18 | +Linux*) | |
19 | + # Test if the compiler is 64bit | |
20 | + echo 'int i;' > conftest.$ac_ext | |
21 | + python_cv_cc_64bit_output=no | |
22 | + if AC_TRY_EVAL(ac_compile); then | |
23 | + case `/usr/bin/file conftest.$ac_objext` in | |
24 | + *"ELF 64"*) | |
25 | + python_cv_cc_64bit_output=yes | |
26 | + ;; | |
27 | + esac | |
28 | + fi | |
29 | + rm -rf conftest* | |
30 | + ;; | |
31 | +esac | |
32 | + | |
33 | +case $ARCH:$python_cv_cc_64bit_output in | |
34 | +powerpc64:yes | s390x:yes | sparc64:yes | x86_64:yes) | |
35 | + LIB="lib64" | |
36 | + ;; | |
c2623236 JR |
37 | +x86_64:no) |
38 | + LIB="libx32" | |
39 | + ;; | |
ca37566f | 40 | +*:*) |
41 | + LIB="lib" | |
42 | + ;; | |
43 | +esac | |
44 | +AC_MSG_RESULT($LIB) | |
45 | ||
46 | AC_SUBST(LIBRARY) | |
47 | AC_MSG_CHECKING(LIBRARY) | |
ca37566f | 48 | --- Python-2.5b2.orig/Include/pythonrun.h 2006-04-03 07:26:32.000000000 +0100 |
49 | +++ Python-2.5b2/Include/pythonrun.h 2006-07-12 17:42:51.000000000 +0100 | |
50 | @@ -107,6 +107,8 @@ | |
9a494cfb ER |
51 | /* In their own files */ |
52 | PyAPI_FUNC(const char *) Py_GetVersion(void); | |
53 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | |
54 | +PyAPI_FUNC(const char *) Py_GetArch(void); | |
55 | +PyAPI_FUNC(const char *) Py_GetLib(void); | |
56 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | |
57 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | |
58 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | |
ca37566f | 59 | --- Python-2.5b2.orig/Lib/distutils/command/install.py 2006-03-27 22:55:21.000000000 +0100 |
60 | +++ Python-2.5b2/Lib/distutils/command/install.py 2006-07-12 17:42:51.000000000 +0100 | |
9a494cfb ER |
61 | @@ -19,6 +19,8 @@ |
62 | from distutils.errors import DistutilsOptionError | |
63 | from glob import glob | |
64 | ||
65 | +libname = sys.lib | |
66 | + | |
67 | if sys.version < "2.2": | |
68 | WINDOWS_SCHEME = { | |
69 | 'purelib': '$base', | |
70 | @@ -39,14 +41,14 @@ | |
16835136 JK |
71 | INSTALL_SCHEMES = { |
72 | 'unix_prefix': { | |
5a2b75ad JK |
73 | - 'purelib': '$base/lib/python$py_version_short/site-packages', |
74 | + 'purelib': '$base/'+libname+'/python$py_version_short/site-packages', | |
16835136 | 75 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', |
9a494cfb | 76 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', |
16835136 JK |
77 | 'headers': '$base/include/python$py_version_short/$dist_name', |
78 | 'scripts': '$base/bin', | |
79 | 'data' : '$base', | |
80 | }, | |
81 | 'unix_home': { | |
5a2b75ad JK |
82 | - 'purelib': '$base/lib/python', |
83 | + 'purelib': '$base/'+libname+'/python', | |
16835136 | 84 | - 'platlib': '$base/lib/python', |
9a494cfb | 85 | + 'platlib': '$base/'+libname+'/python', |
16835136 JK |
86 | 'headers': '$base/include/python/$dist_name', |
87 | 'scripts': '$base/bin', | |
88 | 'data' : '$base', | |
ca37566f | 89 | --- Python-2.5b2.orig/Lib/distutils/sysconfig.py 2006-06-27 11:08:25.000000000 +0100 |
90 | +++ Python-2.5b2/Lib/distutils/sysconfig.py 2006-07-12 17:42:51.000000000 +0100 | |
9a494cfb ER |
91 | @@ -99,8 +99,12 @@ |
92 | prefix = plat_specific and EXEC_PREFIX or PREFIX | |
93 | ||
54029e24 | 94 | if os.name == "posix": |
9a494cfb ER |
95 | + if plat_specific: |
96 | + lib = sys.lib | |
97 | + else: | |
98 | + lib = 'lib' | |
99 | libpython = os.path.join(prefix, | |
54029e24 | 100 | - "lib", "python" + get_python_version()) |
9a494cfb ER |
101 | + lib, "python" + get_python_version()) |
102 | if standard_lib: | |
103 | return libpython | |
633d5774 | 104 | else: |
ca37566f | 105 | --- Python-2.5b2.orig/Lib/distutils/tests/test_install.py 2004-06-26 00:02:59.000000000 +0100 |
106 | +++ Python-2.5b2/Lib/distutils/tests/test_install.py 2006-07-12 17:42:51.000000000 +0100 | |
5a2b75ad | 107 | @@ -39,8 +39,8 @@ |
ca37566f | 108 | self.assertEqual(got, expected) |
109 | ||
5a2b75ad JK |
110 | - libdir = os.path.join(destination, "lib", "python") |
111 | + libdir = os.path.join(destination, sys.lib, "python") | |
ca37566f | 112 | check_path(cmd.install_lib, libdir) |
5a2b75ad | 113 | check_path(cmd.install_platlib, libdir) |
ca37566f | 114 | check_path(cmd.install_purelib, libdir) |
115 | check_path(cmd.install_headers, | |
116 | os.path.join(destination, "include", "python", "foopkg")) | |
ca37566f | 117 | --- Python-2.5b2.orig/Lib/site.py 2006-06-12 09:23:02.000000000 +0100 |
118 | +++ Python-2.5b2/Lib/site.py 2006-07-12 17:42:51.000000000 +0100 | |
21748cff | 119 | @@ -265,12 +265,19 @@ |
c9c8df30 | 120 | if sys.platform in ('os2emx', 'riscos'): |
21748cff | 121 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) |
c9c8df30 | 122 | elif os.sep == '/': |
21748cff AM |
123 | - sitepackages.append(os.path.join(prefix, "lib", |
124 | + sitepackages.append(os.path.join(prefix, sys.lib, | |
c9c8df30 AM |
125 | "python" + sys.version[:3], |
126 | "site-packages")) | |
21748cff AM |
127 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) |
128 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | |
c9c8df30 | 129 | + if sys.lib != 'lib': |
21748cff | 130 | + sitepackages.append(os.path.join(prefix, |
c9c8df30 AM |
131 | + 'lib', |
132 | + "python" + sys.version[:3], | |
133 | + "site-packages")) | |
21748cff | 134 | + sitepackages.append(os.path.join(prefix, 'lib', "site-python")) |
c9c8df30 AM |
135 | + |
136 | else: | |
21748cff AM |
137 | sitepackages.append(prefix) |
138 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | |
139 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | |
c9c8df30 AM |
140 | if sys.platform == "darwin": |
141 | # for framework builds *only* we add the standard Apple | |
ca37566f | 142 | --- Python-2.5b2.orig/Makefile.pre.in 2006-06-27 16:45:32.000000000 +0100 |
143 | +++ Python-2.5b2/Makefile.pre.in 2006-07-12 17:42:51.000000000 +0100 | |
144 | @@ -75,6 +75,8 @@ | |
145 | ||
146 | # Machine-dependent subdirectories | |
147 | MACHDEP= @MACHDEP@ | |
148 | +LIB= @LIB@ | |
149 | +ARCH= @ARCH@ | |
150 | ||
151 | # Install prefix for architecture-independent files | |
152 | prefix= @prefix@ | |
153 | @@ -84,11 +86,11 @@ | |
154 | ||
155 | # Expanded directories | |
21748cff AM |
156 | BINDIR= @bindir@ |
157 | -LIBDIR= @libdir@ | |
158 | +LIBDIR= @libdir@ | |
ca37566f | 159 | MANDIR= @mandir@ |
160 | INCLUDEDIR= @includedir@ | |
161 | CONFINCLUDEDIR= $(exec_prefix)/include | |
162 | -SCRIPTDIR= $(prefix)/lib | |
163 | +SCRIPTDIR= $(prefix)/$(LIB) | |
164 | ||
165 | # Detailed destination directories | |
166 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | |
167 | @@ -489,7 +491,7 @@ | |
168 | Python/compile.o Python/symtable.o: $(GRAMMAR_H) $(AST_H) | |
169 | ||
170 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | |
171 | - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c | |
172 | + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | |
173 | ||
174 | Python/importdl.o: $(srcdir)/Python/importdl.c | |
175 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | |
ca37566f | 176 | --- Python-2.5b2.orig/Modules/getpath.c 2006-07-10 02:18:57.000000000 +0100 |
177 | +++ Python-2.5b2/Modules/getpath.c 2006-07-12 17:42:51.000000000 +0100 | |
c2623236 | 178 | @@ -116,9 +116,21 @@ |
9a494cfb ER |
179 | #define EXEC_PREFIX PREFIX |
180 | #endif | |
16835136 | 181 | |
9a494cfb | 182 | +#ifndef LIB_PYTHON |
865660bf | 183 | +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) |
c2623236 JR |
184 | +#if defined(__ILP32__) |
185 | +#define LIB_PYTHON "libx32/python" | |
186 | +#else | |
b6ecd72f | 187 | +#define LIB_PYTHON "lib64/python" |
c2623236 | 188 | +#endif |
9a494cfb | 189 | +#else |
b6ecd72f | 190 | +#define LIB_PYTHON "lib/python" |
9a494cfb ER |
191 | +#endif |
192 | +#endif | |
193 | + | |
16835136 | 194 | #ifndef PYTHONPATH |
9a494cfb | 195 | -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ |
16835136 | 196 | - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" |
b6ecd72f | 197 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \ |
198 | + EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" | |
16835136 JK |
199 | #endif |
200 | ||
201 | #ifndef LANDMARK | |
ca37566f | 202 | @@ -129,7 +137,7 @@ |
16835136 JK |
203 | static char exec_prefix[MAXPATHLEN+1]; |
204 | static char progpath[MAXPATHLEN+1]; | |
205 | static char *module_search_path = NULL; | |
206 | -static char lib_python[] = "lib/python" VERSION; | |
b6ecd72f | 207 | +static char lib_python[] = LIB_PYTHON VERSION; |
16835136 JK |
208 | |
209 | static void | |
9a494cfb | 210 | reduce(char *dir) |
ca37566f | 211 | --- Python-2.5b2.orig/Python/getplatform.c 2000-09-02 00:29:29.000000000 +0100 |
212 | +++ Python-2.5b2/Python/getplatform.c 2006-07-12 17:42:51.000000000 +0100 | |
9a494cfb ER |
213 | @@ -10,3 +10,23 @@ |
214 | { | |
215 | return PLATFORM; | |
216 | } | |
217 | + | |
218 | +#ifndef ARCH | |
219 | +#define ARCH "unknown" | |
220 | +#endif | |
221 | + | |
222 | +const char * | |
223 | +Py_GetArch(void) | |
224 | +{ | |
225 | + return ARCH; | |
226 | +} | |
227 | + | |
228 | +#ifndef LIB | |
229 | +#define LIB "lib" | |
230 | +#endif | |
231 | + | |
232 | +const char * | |
233 | +Py_GetLib(void) | |
234 | +{ | |
235 | + return LIB; | |
236 | +} | |
ca37566f | 237 | --- Python-2.5b2.orig/Python/sysmodule.c 2006-07-10 22:08:24.000000000 +0100 |
238 | +++ Python-2.5b2/Python/sysmodule.c 2006-07-12 17:42:51.000000000 +0100 | |
c9c8df30 | 239 | @@ -1377,6 +1377,10 @@ |
21748cff AM |
240 | PyString_FromString(Py_GetCopyright())); |
241 | SET_SYS_FROM_STRING("platform", | |
242 | PyString_FromString(Py_GetPlatform())); | |
243 | + SET_SYS_FROM_STRING("arch", | |
244 | + PyString_FromString(Py_GetArch())); | |
245 | + SET_SYS_FROM_STRING("lib", | |
246 | + PyString_FromString(Py_GetLib())); | |
247 | SET_SYS_FROM_STRING("executable", | |
248 | PyString_FromString(Py_GetProgramFullPath())); | |
249 | SET_SYS_FROM_STRING("prefix", | |
ca37566f | 250 | --- Python-2.5b2.orig/setup.py 2006-06-30 07:18:39.000000000 +0100 |
251 | +++ Python-2.5b2/setup.py 2006-07-12 17:45:14.000000000 +0100 | |
1e4c5e1c | 252 | @@ -491,6 +491,7 @@ |
9a494cfb ER |
253 | except NameError: |
254 | have_unicode = 0 | |
352d3900 | 255 | |
9a494cfb ER |
256 | + libname = sys.lib |
257 | # lib_dirs and inc_dirs are used to search for files; | |
258 | # if a file is found in one of those directories, it can | |
259 | # be assumed that no additional -I,-L directives are needed. | |
1e4c5e1c AM |
260 | @@ -502,8 +503,7 @@ |
261 | ): | |
262 | add_dir_to_list(inc_dirs, d) | |
263 | for d in ( | |
264 | - '/lib64', '/usr/lib64', | |
265 | - '/lib', '/usr/lib', | |
266 | + libname, '/usr/'+libname | |
267 | ): | |
268 | add_dir_to_list(lib_dirs, d) | |
9a494cfb | 269 | exts = [] |
ca37566f | 270 | @@ -496,11 +496,11 @@ |
21748cff AM |
271 | elif curses_library: |
272 | readline_libs.append(curses_library) | |
9a494cfb | 273 | elif self.compiler.find_library_file(lib_dirs + |
21748cff AM |
274 | - ['/usr/lib/termcap'], |
275 | + ['/usr' + libname + '/termcap'], | |
276 | 'termcap'): | |
9a494cfb ER |
277 | readline_libs.append('termcap') |
278 | exts.append( Extension('readline', ['readline.c'], | |
279 | - library_dirs=['/usr/lib/termcap'], | |
21748cff | 280 | + library_dirs=['/usr' + libname + '/termcap'], |
ca37566f | 281 | extra_link_args=readline_extra_link_args, |
9a494cfb | 282 | libraries=readline_libs) ) |
21748cff | 283 | else: |
ca37566f | 284 | @@ -1244,8 +1244,8 @@ |
9a494cfb ER |
285 | added_lib_dirs.append('/usr/openwin/lib') |
286 | elif os.path.exists('/usr/X11R6/include'): | |
287 | include_dirs.append('/usr/X11R6/include') | |
288 | - added_lib_dirs.append('/usr/X11R6/lib64') | |
289 | - added_lib_dirs.append('/usr/X11R6/lib') | |
290 | + added_lib_dirs.append('/usr/X11R6/'+sys.lib) | |
291 | + #added_lib_dirs.append('/usr/X11R6/lib') | |
292 | elif os.path.exists('/usr/X11R5/include'): | |
293 | include_dirs.append('/usr/X11R5/include') | |
294 | added_lib_dirs.append('/usr/X11R5/lib') | |
21748cff AM |
295 | --- Python-2.7/Lib/test/test_site.py~ 2010-05-14 01:59:41.000000000 +0200 |
296 | +++ Python-2.7/Lib/test/test_site.py 2010-07-05 20:36:37.311186935 +0200 | |
317eb744 | 297 | @@ -226,7 +226,7 @@ |
21748cff AM |
298 | |
299 | if sys.platform in ('os2emx', 'riscos'): | |
300 | self.assertEqual(len(dirs), 1) | |
301 | - wanted = os.path.join('xoxo', 'Lib', 'site-packages') | |
302 | + wanted = os.path.join('xoxo', sys.lib, 'site-packages') | |
de4a5794 | 303 | self.assertEqual(dirs[0], wanted) |
317eb744 AM |
304 | elif (sys.platform == "darwin" and |
305 | sysconfig.get_config_var("PYTHONFRAMEWORK")): | |
306 | @@ -242,16 +242,16 @@ | |
21748cff | 307 | elif os.sep == '/': |
317eb744 | 308 | # OS X non-framwework builds, Linux, FreeBSD, etc |
de4a5794 | 309 | self.assertEqual(len(dirs), 2) |
21748cff AM |
310 | - wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], |
311 | + wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], | |
312 | 'site-packages') | |
de4a5794 | 313 | self.assertEqual(dirs[0], wanted) |
21748cff AM |
314 | - wanted = os.path.join('xoxo', 'lib', 'site-python') |
315 | + wanted = os.path.join('xoxo', sys.lib, 'site-python') | |
de4a5794 | 316 | self.assertEqual(dirs[1], wanted) |
21748cff | 317 | else: |
317eb744 | 318 | # other platforms |
de4a5794 AM |
319 | self.assertEqual(len(dirs), 2) |
320 | self.assertEqual(dirs[0], 'xoxo') | |
21748cff AM |
321 | - wanted = os.path.join('xoxo', 'lib', 'site-packages') |
322 | + wanted = os.path.join('xoxo', sys.lib, 'site-packages') | |
de4a5794 | 323 | self.assertEqual(dirs[1], wanted) |
21748cff | 324 | |
317eb744 | 325 | class PthFile(object): |
30c7170b AM |
326 | --- Python-2.7/Lib/sysconfig.py.org 2010-05-20 00:20:14.000000000 +0200 |
327 | +++ Python-2.7/Lib/sysconfig.py 2010-07-06 08:31:15.687728628 +0200 | |
328 | @@ -5,22 +5,24 @@ | |
329 | import os | |
330 | from os.path import pardir, realpath | |
331 | ||
332 | +libname = sys.lib | |
333 | + | |
334 | _INSTALL_SCHEMES = { | |
335 | 'posix_prefix': { | |
336 | - 'stdlib': '{base}/lib/python{py_version_short}', | |
337 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | |
338 | - 'purelib': '{base}/lib/python{py_version_short}/site-packages', | |
339 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | |
340 | + 'stdlib': '{base}/' + libname + '/python{py_version_short}', | |
341 | + 'platstdlib': '{platbase}/' + libname + '/python{py_version_short}', | |
342 | + 'purelib': '{base}/' + libname + '/python{py_version_short}/site-packages', | |
343 | + 'platlib': '{platbase}/' + libname + '/python{py_version_short}/site-packages', | |
344 | 'include': '{base}/include/python{py_version_short}', | |
345 | 'platinclude': '{platbase}/include/python{py_version_short}', | |
346 | 'scripts': '{base}/bin', | |
347 | 'data': '{base}', | |
348 | }, | |
349 | 'posix_home': { | |
350 | - 'stdlib': '{base}/lib/python', | |
351 | - 'platstdlib': '{base}/lib/python', | |
352 | - 'purelib': '{base}/lib/python', | |
353 | - 'platlib': '{base}/lib/python', | |
354 | + 'stdlib': '{base}/' + libname + '/python', | |
355 | + 'platstdlib': '{base}/' + libname + '/python', | |
356 | + 'purelib': '{base}/' + libname + '/python', | |
357 | + 'platlib': '{base}/' + libname + '/python', | |
358 | 'include': '{base}/include/python', | |
359 | 'platinclude': '{base}/include/python', | |
360 | 'scripts': '{base}/bin', | |
361 | @@ -65,10 +67,10 @@ | |
362 | 'data' : '{userbase}', | |
363 | }, | |
364 | 'posix_user': { | |
365 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | |
366 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | |
367 | - 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | |
368 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | |
369 | + 'stdlib': '{userbase}/' + libname + '/python{py_version_short}', | |
370 | + 'platstdlib': '{userbase}/' + libname + '/python{py_version_short}', | |
371 | + 'purelib': '{userbase}/' + libname + '/python{py_version_short}/site-packages', | |
372 | + 'platlib': '{userbase}/' + libname + '/python{py_version_short}/site-packages', | |
373 | 'include': '{userbase}/include/python{py_version_short}', | |
374 | 'scripts': '{userbase}/bin', | |
375 | 'data' : '{userbase}', | |
dbafd771 JK |
376 | @@ -532,7 +534,7 @@ |
377 | } | |
378 | else | |
379 | strncpy(zip_path, PREFIX, MAXPATHLEN); | |
380 | - joinpath(zip_path, "lib/python00.zip"); | |
381 | + joinpath(zip_path, LIB_PYTHON "00.zip"); | |
382 | bufsz = strlen(zip_path); /* Replace "00" with version */ | |
383 | zip_path[bufsz - 6] = VERSION[0]; | |
384 | zip_path[bufsz - 5] = VERSION[2]; | |
385 |