diff options
Diffstat (limited to 'meta/recipes-devtools/python/python/multilib.patch')
-rw-r--r-- | meta/recipes-devtools/python/python/multilib.patch | 298 |
1 files changed, 0 insertions, 298 deletions
diff --git a/meta/recipes-devtools/python/python/multilib.patch b/meta/recipes-devtools/python/python/multilib.patch deleted file mode 100644 index d24bc15f01..0000000000 --- a/meta/recipes-devtools/python/python/multilib.patch +++ /dev/null | |||
@@ -1,298 +0,0 @@ | |||
1 | Rebased for python-2.7.9 | ||
2 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
3 | Upstream-Status: Pending | ||
4 | Index: Python-2.7.14/configure.ac | ||
5 | =================================================================== | ||
6 | --- Python-2.7.14.orig/configure.ac | ||
7 | +++ Python-2.7.14/configure.ac | ||
8 | @@ -758,6 +758,10 @@ SunOS*) | ||
9 | ;; | ||
10 | esac | ||
11 | |||
12 | +AC_SUBST(LIB) | ||
13 | +AC_MSG_CHECKING(LIB) | ||
14 | +LIB="SEDMELIBLEAF" | ||
15 | +AC_MSG_RESULT($LIB) | ||
16 | |||
17 | AC_SUBST(LIBRARY) | ||
18 | AC_MSG_CHECKING(LIBRARY) | ||
19 | Index: Python-2.7.14/Include/pythonrun.h | ||
20 | =================================================================== | ||
21 | --- Python-2.7.14.orig/Include/pythonrun.h | ||
22 | +++ Python-2.7.14/Include/pythonrun.h | ||
23 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | ||
24 | /* In their own files */ | ||
25 | PyAPI_FUNC(const char *) Py_GetVersion(void); | ||
26 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | ||
27 | +PyAPI_FUNC(const char *) Py_GetLib(void); | ||
28 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | ||
29 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | ||
30 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | ||
31 | Index: Python-2.7.14/Lib/distutils/command/install.py | ||
32 | =================================================================== | ||
33 | --- Python-2.7.14.orig/Lib/distutils/command/install.py | ||
34 | +++ Python-2.7.14/Lib/distutils/command/install.py | ||
35 | @@ -22,6 +22,8 @@ from site import USER_BASE | ||
36 | from site import USER_SITE | ||
37 | |||
38 | |||
39 | +libname = sys.lib | ||
40 | + | ||
41 | if sys.version < "2.2": | ||
42 | WINDOWS_SCHEME = { | ||
43 | 'purelib': '$base', | ||
44 | @@ -41,8 +43,8 @@ else: | ||
45 | |||
46 | INSTALL_SCHEMES = { | ||
47 | 'unix_prefix': { | ||
48 | - 'purelib': '$base/lib/python$py_version_short/site-packages', | ||
49 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', | ||
50 | + 'purelib': '$platbase/'+libname+'/python$py_version_short/site-packages', | ||
51 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', | ||
52 | 'headers': '$base/include/python$py_version_short/$dist_name', | ||
53 | 'scripts': '$base/bin', | ||
54 | 'data' : '$base', | ||
55 | Index: Python-2.7.14/Lib/distutils/sysconfig.py | ||
56 | =================================================================== | ||
57 | --- Python-2.7.14.orig/Lib/distutils/sysconfig.py | ||
58 | +++ Python-2.7.14/Lib/distutils/sysconfig.py | ||
59 | @@ -119,8 +119,11 @@ def get_python_lib(plat_specific=0, stan | ||
60 | prefix = plat_specific and EXEC_PREFIX or PREFIX | ||
61 | |||
62 | if os.name == "posix": | ||
63 | - libpython = os.path.join(prefix, | ||
64 | - "lib", "python" + get_python_version()) | ||
65 | + if plat_specific or standard_lib: | ||
66 | + lib = sys.lib | ||
67 | + else: | ||
68 | + lib = "lib" | ||
69 | + libpython = os.path.join(prefix, lib, "python" + get_python_version()) | ||
70 | if standard_lib: | ||
71 | return libpython | ||
72 | else: | ||
73 | Index: Python-2.7.14/Lib/pydoc.py | ||
74 | =================================================================== | ||
75 | --- Python-2.7.14.orig/Lib/pydoc.py | ||
76 | +++ Python-2.7.14/Lib/pydoc.py | ||
77 | @@ -375,7 +375,7 @@ class Doc: | ||
78 | docmodule = docclass = docroutine = docother = docproperty = docdata = fail | ||
79 | |||
80 | def getdocloc(self, object, | ||
81 | - basedir=os.path.join(sys.exec_prefix, "lib", | ||
82 | + basedir=os.path.join(sys.exec_prefix, "sys.lib", | ||
83 | "python"+sys.version[0:3])): | ||
84 | """Return the location of module docs or None""" | ||
85 | |||
86 | Index: Python-2.7.14/Lib/site.py | ||
87 | =================================================================== | ||
88 | --- Python-2.7.14.orig/Lib/site.py | ||
89 | +++ Python-2.7.14/Lib/site.py | ||
90 | @@ -288,13 +288,18 @@ def getsitepackages(): | ||
91 | if sys.platform in ('os2emx', 'riscos'): | ||
92 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | ||
93 | elif os.sep == '/': | ||
94 | - sitepackages.append(os.path.join(prefix, "lib", | ||
95 | + sitepackages.append(os.path.join(prefix, sys.lib, | ||
96 | "python" + sys.version[:3], | ||
97 | "site-packages")) | ||
98 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
99 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | ||
100 | + if sys.lib != "lib": | ||
101 | + sitepackages.append(os.path.join(prefix, "lib", | ||
102 | + "python" + sys.version[:3], | ||
103 | + "site-packages")) | ||
104 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
105 | else: | ||
106 | sitepackages.append(prefix) | ||
107 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | ||
108 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | ||
109 | return sitepackages | ||
110 | |||
111 | def addsitepackages(known_paths): | ||
112 | Index: Python-2.7.14/Lib/sysconfig.py | ||
113 | =================================================================== | ||
114 | --- Python-2.7.14.orig/Lib/sysconfig.py | ||
115 | +++ Python-2.7.14/Lib/sysconfig.py | ||
116 | @@ -7,10 +7,10 @@ from os.path import pardir, realpath | ||
117 | |||
118 | _INSTALL_SCHEMES = { | ||
119 | 'posix_prefix': { | ||
120 | - 'stdlib': '{base}/lib/python{py_version_short}', | ||
121 | - 'platstdlib': '{platbase}/lib/python{py_version_short}', | ||
122 | + 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', | ||
123 | + 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', | ||
124 | 'purelib': '{base}/lib/python{py_version_short}/site-packages', | ||
125 | - 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', | ||
126 | + 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
127 | 'include': '{base}/include/python{py_version_short}', | ||
128 | 'platinclude': '{platbase}/include/python{py_version_short}', | ||
129 | 'scripts': '{base}/bin', | ||
130 | @@ -65,10 +65,10 @@ _INSTALL_SCHEMES = { | ||
131 | 'data' : '{userbase}', | ||
132 | }, | ||
133 | 'posix_user': { | ||
134 | - 'stdlib': '{userbase}/lib/python{py_version_short}', | ||
135 | - 'platstdlib': '{userbase}/lib/python{py_version_short}', | ||
136 | + 'stdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
137 | + 'platstdlib': '{userbase}/'+sys.lib+'/python{py_version_short}', | ||
138 | 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
139 | - 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', | ||
140 | + 'platlib': '{userbase}/'+sys.lib+'/python{py_version_short}/site-packages', | ||
141 | 'include': '{userbase}/include/python{py_version_short}', | ||
142 | 'scripts': '{userbase}/bin', | ||
143 | 'data' : '{userbase}', | ||
144 | Index: Python-2.7.14/Lib/test/test_dl.py | ||
145 | =================================================================== | ||
146 | --- Python-2.7.14.orig/Lib/test/test_dl.py | ||
147 | +++ Python-2.7.14/Lib/test/test_dl.py | ||
148 | @@ -4,10 +4,11 @@ | ||
149 | import unittest | ||
150 | from test.test_support import verbose, import_module | ||
151 | dl = import_module('dl', deprecated=True) | ||
152 | +import sys | ||
153 | |||
154 | sharedlibs = [ | ||
155 | - ('/usr/lib/libc.so', 'getpid'), | ||
156 | - ('/lib/libc.so.6', 'getpid'), | ||
157 | + ('/usr/'+sys.lib+'/libc.so', 'getpid'), | ||
158 | + ('/'+sys.lib+'/libc.so.6', 'getpid'), | ||
159 | ('/usr/bin/cygwin1.dll', 'getpid'), | ||
160 | ('/usr/lib/libc.dylib', 'getpid'), | ||
161 | ] | ||
162 | Index: Python-2.7.14/Lib/test/test_site.py | ||
163 | =================================================================== | ||
164 | --- Python-2.7.14.orig/Lib/test/test_site.py | ||
165 | +++ Python-2.7.14/Lib/test/test_site.py | ||
166 | @@ -252,12 +252,16 @@ class HelperFunctionsTests(unittest.Test | ||
167 | self.assertEqual(dirs[0], wanted) | ||
168 | elif os.sep == '/': | ||
169 | # OS X, Linux, FreeBSD, etc | ||
170 | - self.assertEqual(len(dirs), 2) | ||
171 | wanted = os.path.join('xoxo', 'lib', 'python' + sys.version[:3], | ||
172 | 'site-packages') | ||
173 | - self.assertEqual(dirs[0], wanted) | ||
174 | + self.assertTrue(wanted in dirs) | ||
175 | wanted = os.path.join('xoxo', 'lib', 'site-python') | ||
176 | - self.assertEqual(dirs[1], wanted) | ||
177 | + self.assertTrue(wanted in dirs) | ||
178 | + wanted = os.path.join('xoxo', sys.lib, 'python' + sys.version[:3], | ||
179 | + 'site-packages') | ||
180 | + self.assertTrue(wanted in dirs) | ||
181 | + wanted = os.path.join('xoxo', sys.lib, 'site-python') | ||
182 | + self.assertTrue(wanted in dirs) | ||
183 | else: | ||
184 | # other platforms | ||
185 | self.assertEqual(len(dirs), 2) | ||
186 | Index: Python-2.7.14/Lib/trace.py | ||
187 | =================================================================== | ||
188 | --- Python-2.7.14.orig/Lib/trace.py | ||
189 | +++ Python-2.7.14/Lib/trace.py | ||
190 | @@ -754,10 +754,10 @@ def main(argv=None): | ||
191 | # should I also call expanduser? (after all, could use $HOME) | ||
192 | |||
193 | s = s.replace("$prefix", | ||
194 | - os.path.join(sys.prefix, "lib", | ||
195 | + os.path.join(sys.prefix, sys.lib, | ||
196 | "python" + sys.version[:3])) | ||
197 | s = s.replace("$exec_prefix", | ||
198 | - os.path.join(sys.exec_prefix, "lib", | ||
199 | + os.path.join(sys.exec_prefix, sys.lib, | ||
200 | "python" + sys.version[:3])) | ||
201 | s = os.path.normpath(s) | ||
202 | ignore_dirs.append(s) | ||
203 | Index: Python-2.7.14/Makefile.pre.in | ||
204 | =================================================================== | ||
205 | --- Python-2.7.14.orig/Makefile.pre.in | ||
206 | +++ Python-2.7.14/Makefile.pre.in | ||
207 | @@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | ||
208 | |||
209 | # Machine-dependent subdirectories | ||
210 | MACHDEP= @MACHDEP@ | ||
211 | +LIB= @LIB@ | ||
212 | |||
213 | # Multiarch directory (may be empty) | ||
214 | MULTIARCH= @MULTIARCH@ | ||
215 | @@ -110,7 +111,7 @@ LIBDIR= @libdir@ | ||
216 | MANDIR= @mandir@ | ||
217 | INCLUDEDIR= @includedir@ | ||
218 | CONFINCLUDEDIR= $(exec_prefix)/include | ||
219 | -SCRIPTDIR= $(prefix)/lib | ||
220 | +SCRIPTDIR= $(prefix)/@LIB@ | ||
221 | |||
222 | # Detailed destination directories | ||
223 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | ||
224 | @@ -645,6 +646,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | ||
225 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | ||
226 | -DVERSION='"$(VERSION)"' \ | ||
227 | -DVPATH='"$(VPATH)"' \ | ||
228 | + -DLIB='"$(LIB)"' \ | ||
229 | -o $@ $(srcdir)/Modules/getpath.c | ||
230 | |||
231 | Modules/python.o: $(srcdir)/Modules/python.c | ||
232 | @@ -693,7 +695,7 @@ regen-ast: | ||
233 | Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h | ||
234 | |||
235 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | ||
236 | - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c | ||
237 | + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | ||
238 | |||
239 | Python/importdl.o: $(srcdir)/Python/importdl.c | ||
240 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | ||
241 | Index: Python-2.7.14/Modules/getpath.c | ||
242 | =================================================================== | ||
243 | --- Python-2.7.14.orig/Modules/getpath.c | ||
244 | +++ Python-2.7.14/Modules/getpath.c | ||
245 | @@ -100,6 +100,13 @@ | ||
246 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" | ||
247 | #endif | ||
248 | |||
249 | +#define LIB_PYTHON LIB "/python" VERSION | ||
250 | + | ||
251 | +#ifndef PYTHONPATH | ||
252 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ | ||
253 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" | ||
254 | +#endif | ||
255 | + | ||
256 | #ifndef LANDMARK | ||
257 | #define LANDMARK "os.py" | ||
258 | #endif | ||
259 | @@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; | ||
260 | static char exec_prefix[MAXPATHLEN+1]; | ||
261 | static char progpath[MAXPATHLEN+1]; | ||
262 | static char *module_search_path = NULL; | ||
263 | -static char lib_python[] = "lib/python" VERSION; | ||
264 | +static char lib_python[] = LIB_PYTHON; | ||
265 | |||
266 | static void | ||
267 | reduce(char *dir) | ||
268 | Index: Python-2.7.14/Python/getplatform.c | ||
269 | =================================================================== | ||
270 | --- Python-2.7.14.orig/Python/getplatform.c | ||
271 | +++ Python-2.7.14/Python/getplatform.c | ||
272 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | ||
273 | { | ||
274 | return PLATFORM; | ||
275 | } | ||
276 | + | ||
277 | +#ifndef LIB | ||
278 | +#define LIB "lib" | ||
279 | +#endif | ||
280 | + | ||
281 | +const char * | ||
282 | +Py_GetLib(void) | ||
283 | +{ | ||
284 | + return LIB; | ||
285 | +} | ||
286 | Index: Python-2.7.14/Python/sysmodule.c | ||
287 | =================================================================== | ||
288 | --- Python-2.7.14.orig/Python/sysmodule.c | ||
289 | +++ Python-2.7.14/Python/sysmodule.c | ||
290 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) | ||
291 | PyString_FromString(Py_GetCopyright())); | ||
292 | SET_SYS_FROM_STRING("platform", | ||
293 | PyString_FromString(Py_GetPlatform())); | ||
294 | + SET_SYS_FROM_STRING("lib", | ||
295 | + PyString_FromString(Py_GetLib())); | ||
296 | SET_SYS_FROM_STRING("executable", | ||
297 | PyString_FromString(Py_GetProgramFullPath())); | ||
298 | SET_SYS_FROM_STRING("prefix", | ||