]>
Commit | Line | Data |
---|---|---|
71f47f15 JB |
1 | --- Python-3.3.1/configure.ac.orig 2013-04-18 16:31:07.244030129 +0200 |
2 | +++ Python-3.3.1/configure.ac 2013-04-18 17:30:31.800622500 +0200 | |
58274b36 | 3 | @@ -769,6 +768,45 @@ |
71f47f15 JB |
4 | MULTIARCH=$($CC --print-multiarch 2>/dev/null) |
5 | AC_SUBST(MULTIARCH) | |
e684db95 AM |
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 | + ;; | |
58274b36 JR |
37 | +x86_64:no) |
38 | + LIB="libx32" | |
39 | + ;; | |
e684db95 AM |
40 | +*:*) |
41 | + LIB="lib" | |
42 | + ;; | |
43 | +esac | |
44 | +AC_MSG_RESULT($LIB) | |
71f47f15 | 45 | + |
e684db95 AM |
46 | |
47 | AC_SUBST(LIBRARY) | |
48 | AC_MSG_CHECKING(LIBRARY) | |
71f47f15 | 49 | --- Python-3.2.1.orig/Include/pythonrun.h 2011-07-09 07:58:46.000000000 +0100 |
58aa28a5 | 50 | +++ Python-3.2.1/Include/pythonrun.h 2011-07-12 22:20:12.000000000 +0100 |
75257062 | 51 | @@ -175,6 +175,8 @@ |
e684db95 AM |
52 | /* In their own files */ |
53 | PyAPI_FUNC(const char *) Py_GetVersion(void); | |
54 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | |
55 | +PyAPI_FUNC(const char *) Py_GetArch(void); | |
56 | +PyAPI_FUNC(const char *) Py_GetLib(void); | |
57 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | |
58 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | |
59 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | |
71f47f15 | 60 | --- Python-3.2.1.orig/Lib/distutils/command/install.py 2011-07-09 07:58:46.000000000 +0100 |
58aa28a5 | 61 | +++ Python-3.2.1/Lib/distutils/command/install.py 2011-07-12 22:20:12.000000000 +0100 |
38874ce8 AM |
62 | @@ -19,6 +19,8 @@ from site import USER_BASE |
63 | from site import USER_SITE | |
64 | HAS_USER_SITE = True | |
e684db95 AM |
65 | |
66 | +libname = sys.lib | |
67 | + | |
38874ce8 AM |
68 | WINDOWS_SCHEME = { |
69 | 'purelib': '$base/Lib/site-packages', | |
70 | 'platlib': '$base/Lib/site-packages', | |
e3852288 | 71 | @@ -47,14 +49,14 @@ |
e684db95 AM |
72 | INSTALL_SCHEMES = { |
73 | 'unix_prefix': { | |
74 | 'purelib': '$base/lib/python$py_version_short/site-packages', | |
75 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', | |
76 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', | |
e3852288 | 77 | 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', |
e684db95 AM |
78 | 'scripts': '$base/bin', |
79 | 'data' : '$base', | |
80 | }, | |
81 | 'unix_home': { | |
82 | 'purelib': '$base/lib/python', | |
83 | - 'platlib': '$base/lib/python', | |
84 | + 'platlib': '$base/'+libname+'/python', | |
85 | 'headers': '$base/include/python/$dist_name', | |
86 | 'scripts': '$base/bin', | |
87 | 'data' : '$base', | |
71f47f15 | 88 | --- Python-3.2.1.orig/Lib/distutils/sysconfig.py 2011-07-09 07:58:47.000000000 +0100 |
58aa28a5 | 89 | +++ Python-3.2.1/Lib/distutils/sysconfig.py 2011-07-12 22:20:12.000000000 +0100 |
75257062 | 90 | @@ -124,8 +124,12 @@ |
e684db95 AM |
91 | prefix = plat_specific and EXEC_PREFIX or PREFIX |
92 | ||
93 | if os.name == "posix": | |
94 | + if plat_specific: | |
95 | + lib = sys.lib | |
96 | + else: | |
97 | + lib = 'lib' | |
98 | libpython = os.path.join(prefix, | |
99 | - "lib", "python" + get_python_version()) | |
100 | + lib, "python" + get_python_version()) | |
101 | if standard_lib: | |
102 | return libpython | |
103 | else: | |
71f47f15 | 104 | --- Python-3.2.1.orig/Lib/distutils/tests/test_install.py 2011-07-09 07:58:47.000000000 +0100 |
58aa28a5 | 105 | +++ Python-3.2.1/Lib/distutils/tests/test_install.py 2011-07-12 22:20:12.000000000 +0100 |
75257062 | 106 | @@ -49,8 +49,9 @@ |
e684db95 AM |
107 | self.assertEqual(got, expected) |
108 | ||
109 | libdir = os.path.join(destination, "lib", "python") | |
110 | + platlibdir = os.path.join(destination, sys.lib, "python") | |
111 | check_path(cmd.install_lib, libdir) | |
112 | - check_path(cmd.install_platlib, libdir) | |
113 | + check_path(cmd.install_platlib, platlibdir) | |
114 | check_path(cmd.install_purelib, libdir) | |
115 | check_path(cmd.install_headers, | |
116 | os.path.join(destination, "include", "python", "foopkg")) | |
71f47f15 | 117 | --- Python-3.2.1.orig/Lib/site.py 2011-07-09 07:58:49.000000000 +0100 |
58aa28a5 | 118 | +++ Python-3.2.1/Lib/site.py 2011-07-12 22:20:12.000000000 +0100 |
38874ce8 AM |
119 | @@ -304,13 +304,16 @@ def getsitepackages(prefixes=None): |
120 | seen.add(prefix) | |
121 | ||
122 | if os.sep == '/': | |
e3852288 JB |
123 | - sitepackages.append(os.path.join(prefix, "lib", |
124 | + sitepackages.append(os.path.join(prefix, sys.lib, | |
04df829f | 125 | "python" + sys.version[:3], |
126 | "site-packages")) | |
e3852288 JB |
127 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) |
128 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | |
04df829f | 129 | + if sys.lib != 'lib': |
e3852288 JB |
130 | + sitepackages.append(os.path.join(prefix, "lib", "python" + sys.version[:3], "site-packages")) |
131 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | |
04df829f | 132 | else: |
e3852288 JB |
133 | sitepackages.append(prefix) |
134 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | |
135 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | |
04df829f | 136 | if sys.platform == "darwin": |
137 | # for framework builds *only* we add the standard Apple | |
e3852288 | 138 | # locations. |
71f47f15 | 139 | --- Python-3.2.1.orig/Lib/sysconfig.py 2011-07-09 07:58:49.000000000 +0100 |
58aa28a5 | 140 | +++ Python-3.2.1/Lib/sysconfig.py 2011-07-12 22:20:12.000000000 +0100 |
75257062 | 141 | @@ -21,10 +21,10 @@ |
142 | ||
143 | _INSTALL_SCHEMES = { | |
144 | 'posix_prefix': { | |
b88f500a | 145 | - 'stdlib': '{installed_base}/lib/python{py_version_short}', |
75257062 | 146 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', |
b88f500a | 147 | + 'stdlib': '{installed_base}/' + sys.lib + '/python{py_version_short}', |
75257062 | 148 | + 'platstdlib': '{platbase}/' + sys.lib + '/python{py_version_short}', |
149 | 'purelib': '{base}/lib/python{py_version_short}/site-packages', | |
150 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | |
151 | + 'platlib': '{platbase}/' + sys.lib + '/python{py_version_short}/site-packages', | |
152 | 'include': | |
b88f500a | 153 | '{installed_base}/include/python{py_version_short}{abiflags}', |
75257062 | 154 | 'platinclude': |
155 | @@ -33,10 +33,10 @@ | |
156 | 'data': '{base}', | |
157 | }, | |
158 | 'posix_home': { | |
b88f500a | 159 | - 'stdlib': '{installed_base}/lib/python', |
75257062 | 160 | - 'platstdlib': '{base}/lib/python', |
b88f500a | 161 | + 'stdlib': '{installed_base}/' + sys.lib + '/python', |
b9c7955e | 162 | + 'platstdlib': '{base}/' + sys.lib + '/python', |
75257062 | 163 | 'purelib': '{base}/lib/python', |
164 | - 'platlib': '{base}/lib/python', | |
165 | + 'platlib': '{base}/' + sys.lib + '/python', | |
b88f500a AM |
166 | 'include': '{installed_base}/include/python', |
167 | 'platinclude': '{installed_base}/include/python', | |
75257062 | 168 | 'scripts': '{base}/bin', |
71f47f15 | 169 | --- Python-3.2.1.orig/Makefile.pre.in 2011-07-09 07:58:52.000000000 +0100 |
58aa28a5 | 170 | +++ Python-3.2.1/Makefile.pre.in 2011-07-12 22:20:12.000000000 +0100 |
171 | @@ -90,6 +90,8 @@ | |
e684db95 AM |
172 | |
173 | # Machine-dependent subdirectories | |
174 | MACHDEP= @MACHDEP@ | |
175 | +LIB= @LIB@ | |
176 | +ARCH= @ARCH@ | |
177 | ||
178 | # Install prefix for architecture-independent files | |
179 | prefix= @prefix@ | |
58aa28a5 | 180 | @@ -106,7 +108,7 @@ |
e684db95 AM |
181 | MANDIR= @mandir@ |
182 | INCLUDEDIR= @includedir@ | |
183 | CONFINCLUDEDIR= $(exec_prefix)/include | |
184 | -SCRIPTDIR= $(prefix)/lib | |
185 | +SCRIPTDIR= $(prefix)/$(LIB) | |
e3852288 | 186 | ABIFLAGS= @ABIFLAGS@ |
e684db95 AM |
187 | |
188 | # Detailed destination directories | |
58aa28a5 | 189 | @@ -611,7 +613,7 @@ |
e3852288 | 190 | Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) |
e684db95 AM |
191 | |
192 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | |
e3852288 JB |
193 | - $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c |
194 | + $(CC) -c $(PY_CORE_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | |
e684db95 AM |
195 | |
196 | Python/importdl.o: $(srcdir)/Python/importdl.c | |
e3852288 | 197 | $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c |
71f47f15 | 198 | --- Python-3.2.1.orig/Modules/getpath.c 2011-07-09 07:58:54.000000000 +0100 |
58aa28a5 | 199 | +++ Python-3.2.1/Modules/getpath.c 2011-07-12 22:21:48.000000000 +0100 |
58274b36 | 200 | @@ -121,9 +121,21 @@ |
e684db95 AM |
201 | #define EXEC_PREFIX PREFIX |
202 | #endif | |
203 | ||
204 | +#ifndef LIB_PYTHON | |
205 | +#if defined(__x86_64__) || (defined(__sparc__) && defined(__arch64__)) || defined(__powerpc64__) || defined(__s390x__) | |
58274b36 JR |
206 | +#if defined(__ILP32__) |
207 | +#define LIB_PYTHON "libx32/python" | |
208 | +#else | |
38874ce8 | 209 | +#define LIB_PYTHON "lib64/python" |
58274b36 | 210 | +#endif |
e684db95 | 211 | +#else |
38874ce8 | 212 | +#define LIB_PYTHON "lib/python" |
e684db95 AM |
213 | +#endif |
214 | +#endif | |
215 | + | |
216 | #ifndef PYTHONPATH | |
217 | -#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \ | |
218 | - EXEC_PREFIX "/lib/python" VERSION "/lib-dynload" | |
219 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON VERSION ":" \ | |
220 | + EXEC_PREFIX "/" LIB_PYTHON VERSION "/lib-dynload:" | |
221 | #endif | |
222 | ||
223 | #ifndef LANDMARK | |
38874ce8 AM |
224 | @@ -502,7 +502,7 @@ calculate_path(void) |
225 | _pythonpath = _Py_char2wchar(PYTHONPATH, NULL); | |
226 | _prefix = _Py_char2wchar(PREFIX, NULL); | |
227 | _exec_prefix = _Py_char2wchar(EXEC_PREFIX, NULL); | |
228 | - lib_python = _Py_char2wchar("lib/python" VERSION, NULL); | |
229 | + lib_python = _Py_char2wchar(LIB_PYTHON VERSION, NULL); | |
04df829f | 230 | |
38874ce8 AM |
231 | if (!_pythonpath || !_prefix || !_exec_prefix || !lib_python) { |
232 | Py_FatalError( | |
71f47f15 | 233 | --- Python-3.2.1.orig/Python/getplatform.c 2011-07-09 07:58:56.000000000 +0100 |
58aa28a5 | 234 | +++ Python-3.2.1/Python/getplatform.c 2011-07-12 22:20:12.000000000 +0100 |
e684db95 AM |
235 | @@ -10,3 +10,23 @@ |
236 | { | |
237 | return PLATFORM; | |
238 | } | |
239 | + | |
240 | +#ifndef ARCH | |
241 | +#define ARCH "unknown" | |
242 | +#endif | |
243 | + | |
244 | +const char * | |
245 | +Py_GetArch(void) | |
246 | +{ | |
247 | + return ARCH; | |
248 | +} | |
249 | + | |
250 | +#ifndef LIB | |
251 | +#define LIB "lib" | |
252 | +#endif | |
253 | + | |
254 | +const char * | |
255 | +Py_GetLib(void) | |
256 | +{ | |
257 | + return LIB; | |
258 | +} | |
71f47f15 | 259 | --- Python-3.2.1.orig/Python/sysmodule.c 2011-07-09 07:58:56.000000000 +0100 |
58aa28a5 | 260 | +++ Python-3.2.1/Python/sysmodule.c 2011-07-12 22:20:12.000000000 +0100 |
261 | @@ -1560,6 +1560,10 @@ | |
e3852288 JB |
262 | PyUnicode_FromString(Py_GetCopyright())); |
263 | SET_SYS_FROM_STRING("platform", | |
264 | PyUnicode_FromString(Py_GetPlatform())); | |
265 | + SET_SYS_FROM_STRING("arch", | |
266 | + PyUnicode_FromString(Py_GetArch())); | |
267 | + SET_SYS_FROM_STRING("lib", | |
268 | + PyUnicode_FromString(Py_GetLib())); | |
269 | SET_SYS_FROM_STRING("executable", | |
270 | PyUnicode_FromWideChar( | |
271 | Py_GetProgramFullPath(), -1)); | |
71f47f15 | 272 | --- Python-3.2.1.orig/setup.py 2011-07-09 07:58:56.000000000 +0100 |
58aa28a5 | 273 | +++ Python-3.2.1/setup.py 2011-07-12 22:20:12.000000000 +0100 |
b88f500a | 274 | @@ -516,8 +516,7 @@ |
e684db95 | 275 | # be assumed that no additional -I,-L directives are needed. |
b88f500a AM |
276 | if not cross_compiling: |
277 | lib_dirs = self.compiler.library_dirs + [ | |
278 | - '/lib64', '/usr/lib64', | |
279 | - '/lib', '/usr/lib', | |
08dc552f | 280 | + '/' + sys.lib, '/usr/' + sys.lib |
b88f500a AM |
281 | ] |
282 | inc_dirs = self.compiler.include_dirs + ['/usr/include'] | |
e684db95 | 283 | exts = [] |
58aa28a5 | 284 | @@ -643,11 +643,11 @@ |
e3852288 JB |
285 | elif curses_library: |
286 | readline_libs.append(curses_library) | |
e684db95 | 287 | elif self.compiler.find_library_file(lib_dirs + |
e3852288 | 288 | - ['/usr/lib/termcap'], |
cc48af34 | 289 | + ['/usr/' + sys.lib + '/termcap'], |
e3852288 | 290 | 'termcap'): |
e684db95 AM |
291 | readline_libs.append('termcap') |
292 | exts.append( Extension('readline', ['readline.c'], | |
293 | - library_dirs=['/usr/lib/termcap'], | |
cc48af34 | 294 | + library_dirs=['/usr/' + sys.lib + '/termcap'], |
e684db95 AM |
295 | extra_link_args=readline_extra_link_args, |
296 | libraries=readline_libs) ) | |
e3852288 | 297 | else: |