summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3/python-3.3-multilib.patch')
-rw-r--r--meta/recipes-devtools/python/python3/python-3.3-multilib.patch140
1 files changed, 57 insertions, 83 deletions
diff --git a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
index b3e986089e..44ec424cd2 100644
--- a/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
+++ b/meta/recipes-devtools/python/python3/python-3.3-multilib.patch
@@ -7,23 +7,24 @@ get the sys.lib from python itself and do not use hardcoded value of 'lib'
7Signed-off-by: Khem Raj <raj.khem@gmail.com> 7Signed-off-by: Khem Raj <raj.khem@gmail.com>
8Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 8Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
9 9
10Index: Python-3.4.2/Include/pythonrun.h 10Index: Python-3.5.0/Include/pythonrun.h
11=================================================================== 11===================================================================
12--- Python-3.4.2.orig/Include/pythonrun.h 12--- Python-3.5.0.orig/Include/pythonrun.h
13+++ Python-3.4.2/Include/pythonrun.h 13+++ Python-3.5.0/Include/pythonrun.h
14@@ -220,6 +220,8 @@ int _Py_CheckPython3(); 14@@ -23,6 +23,9 @@ typedef struct {
15 /* In their own files */ 15 } PyCompilerFlags;
16 PyAPI_FUNC(const char *) Py_GetVersion(void); 16 #endif
17 PyAPI_FUNC(const char *) Py_GetPlatform(void); 17
18+PyAPI_FUNC(const char *) Py_GetArch(void); 18+PyAPI_FUNC(const char *) Py_GetArch(void);
19+PyAPI_FUNC(const char *) Py_GetLib(void); 19+PyAPI_FUNC(const char *) Py_GetLib(void);
20 PyAPI_FUNC(const char *) Py_GetCopyright(void); 20+
21 PyAPI_FUNC(const char *) Py_GetCompiler(void); 21 #ifndef Py_LIMITED_API
22 PyAPI_FUNC(const char *) Py_GetBuildInfo(void); 22 PyAPI_FUNC(int) PyRun_SimpleStringFlags(const char *, PyCompilerFlags *);
23Index: Python-3.4.2/Lib/distutils/command/install.py 23 PyAPI_FUNC(int) PyRun_AnyFileFlags(FILE *, const char *, PyCompilerFlags *);
24Index: Python-3.5.0/Lib/distutils/command/install.py
24=================================================================== 25===================================================================
25--- Python-3.4.2.orig/Lib/distutils/command/install.py 26--- Python-3.5.0.orig/Lib/distutils/command/install.py
26+++ Python-3.4.2/Lib/distutils/command/install.py 27+++ Python-3.5.0/Lib/distutils/command/install.py
27@@ -19,6 +19,8 @@ from site import USER_BASE 28@@ -19,6 +19,8 @@ from site import USER_BASE
28 from site import USER_SITE 29 from site import USER_SITE
29 HAS_USER_SITE = True 30 HAS_USER_SITE = True
@@ -42,11 +43,11 @@ Index: Python-3.4.2/Lib/distutils/command/install.py
42 'headers': '$base/include/python$py_version_short$abiflags/$dist_name', 43 'headers': '$base/include/python$py_version_short$abiflags/$dist_name',
43 'scripts': '$base/bin', 44 'scripts': '$base/bin',
44 'data' : '$base', 45 'data' : '$base',
45Index: Python-3.4.2/Lib/pydoc.py 46Index: Python-3.5.0/Lib/pydoc.py
46=================================================================== 47===================================================================
47--- Python-3.4.2.orig/Lib/pydoc.py 48--- Python-3.5.0.orig/Lib/pydoc.py
48+++ Python-3.4.2/Lib/pydoc.py 49+++ Python-3.5.0/Lib/pydoc.py
49@@ -394,7 +394,7 @@ class Doc: 50@@ -393,7 +393,7 @@ class Doc:
50 51
51 docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS) 52 docloc = os.environ.get("PYTHONDOCS", self.PYTHONDOCS)
52 53
@@ -55,11 +56,11 @@ Index: Python-3.4.2/Lib/pydoc.py
55 "python%d.%d" % sys.version_info[:2]) 56 "python%d.%d" % sys.version_info[:2])
56 if (isinstance(object, type(os)) and 57 if (isinstance(object, type(os)) and
57 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', 58 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
58Index: Python-3.4.2/Lib/trace.py 59Index: Python-3.5.0/Lib/trace.py
59=================================================================== 60===================================================================
60--- Python-3.4.2.orig/Lib/trace.py 61--- Python-3.5.0.orig/Lib/trace.py
61+++ Python-3.4.2/Lib/trace.py 62+++ Python-3.5.0/Lib/trace.py
62@@ -751,10 +751,10 @@ def main(argv=None): 63@@ -749,10 +749,10 @@ def main(argv=None):
63 # should I also call expanduser? (after all, could use $HOME) 64 # should I also call expanduser? (after all, could use $HOME)
64 65
65 s = s.replace("$prefix", 66 s = s.replace("$prefix",
@@ -72,10 +73,10 @@ Index: Python-3.4.2/Lib/trace.py
72 "python" + sys.version[:3])) 73 "python" + sys.version[:3]))
73 s = os.path.normpath(s) 74 s = os.path.normpath(s)
74 ignore_dirs.append(s) 75 ignore_dirs.append(s)
75Index: Python-3.4.2/Makefile.pre.in 76Index: Python-3.5.0/Makefile.pre.in
76=================================================================== 77===================================================================
77--- Python-3.4.2.orig/Makefile.pre.in 78--- Python-3.5.0.orig/Makefile.pre.in
78+++ Python-3.4.2/Makefile.pre.in 79+++ Python-3.5.0/Makefile.pre.in
79@@ -101,6 +101,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS 80@@ -101,6 +101,8 @@ PY_CORE_CFLAGS= $(PY_CFLAGS) $(PY_CFLAGS
80 81
81 # Machine-dependent subdirectories 82 # Machine-dependent subdirectories
@@ -94,15 +95,15 @@ Index: Python-3.4.2/Makefile.pre.in
94 ABIFLAGS= @ABIFLAGS@ 95 ABIFLAGS= @ABIFLAGS@
95 96
96 # Detailed destination directories 97 # Detailed destination directories
97@@ -712,6 +714,7 @@ Modules/getpath.o: $(srcdir)/Modules/get 98@@ -729,6 +731,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
98 -DEXEC_PREFIX='"$(exec_prefix)"' \ 99 -DEXEC_PREFIX='"$(exec_prefix)"' \
99 -DVERSION='"$(VERSION)"' \ 100 -DVERSION='"$(VERSION)"' \
100 -DVPATH='"$(VPATH)"' \ 101 -DVPATH='"$(VPATH)"' \
101+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \ 102+ -DARCH='"$(ARCH)"' -DLIB='"$(LIB)"' \
102 -o $@ $(srcdir)/Modules/getpath.c 103 -o $@ $(srcdir)/Modules/getpath.c
103 104
104 Modules/python.o: $(srcdir)/Modules/python.c 105 Programs/python.o: $(srcdir)/Programs/python.c
105@@ -780,7 +783,7 @@ $(AST_C): $(AST_H) $(AST_ASDL) $(ASDLGEN 106@@ -798,7 +801,7 @@ $(OPCODE_H): $(srcdir)/Lib/opcode.py $(O
106 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) 107 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
107 108
108 Python/getplatform.o: $(srcdir)/Python/getplatform.c 109 Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -111,10 +112,10 @@ Index: Python-3.4.2/Makefile.pre.in
111 112
112 Python/importdl.o: $(srcdir)/Python/importdl.c 113 Python/importdl.o: $(srcdir)/Python/importdl.c
113 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c 114 $(CC) -c $(PY_CORE_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
114Index: Python-3.4.2/Modules/getpath.c 115Index: Python-3.5.0/Modules/getpath.c
115=================================================================== 116===================================================================
116--- Python-3.4.2.orig/Modules/getpath.c 117--- Python-3.5.0.orig/Modules/getpath.c
117+++ Python-3.4.2/Modules/getpath.c 118+++ Python-3.5.0/Modules/getpath.c
118@@ -117,9 +117,11 @@ 119@@ -117,9 +117,11 @@
119 #define EXEC_PREFIX PREFIX 120 #define EXEC_PREFIX PREFIX
120 #endif 121 #endif
@@ -135,12 +136,12 @@ Index: Python-3.4.2/Modules/getpath.c
135 static wchar_t *module_search_path = NULL; 136 static wchar_t *module_search_path = NULL;
136+static wchar_t *lib_python = L"" LIB_PYTHON; 137+static wchar_t *lib_python = L"" LIB_PYTHON;
137 138
138 static void 139 /* Get file status. Encode the path to the locale encoding. */
139 reduce(wchar_t *dir) 140
140Index: Python-3.4.2/Python/getplatform.c 141Index: Python-3.5.0/Python/getplatform.c
141=================================================================== 142===================================================================
142--- Python-3.4.2.orig/Python/getplatform.c 143--- Python-3.5.0.orig/Python/getplatform.c
143+++ Python-3.4.2/Python/getplatform.c 144+++ Python-3.5.0/Python/getplatform.c
144@@ -10,3 +10,23 @@ Py_GetPlatform(void) 145@@ -10,3 +10,23 @@ Py_GetPlatform(void)
145 { 146 {
146 return PLATFORM; 147 return PLATFORM;
@@ -165,11 +166,11 @@ Index: Python-3.4.2/Python/getplatform.c
165+{ 166+{
166+ return LIB; 167+ return LIB;
167+} 168+}
168Index: Python-3.4.2/Python/sysmodule.c 169Index: Python-3.5.0/Python/sysmodule.c
169=================================================================== 170===================================================================
170--- Python-3.4.2.orig/Python/sysmodule.c 171--- Python-3.5.0.orig/Python/sysmodule.c
171+++ Python-3.4.2/Python/sysmodule.c 172+++ Python-3.5.0/Python/sysmodule.c
172@@ -1697,6 +1697,10 @@ _PySys_Init(void) 173@@ -1767,6 +1767,10 @@ _PySys_Init(void)
173 PyUnicode_FromString(Py_GetCopyright())); 174 PyUnicode_FromString(Py_GetCopyright()));
174 SET_SYS_FROM_STRING("platform", 175 SET_SYS_FROM_STRING("platform",
175 PyUnicode_FromString(Py_GetPlatform())); 176 PyUnicode_FromString(Py_GetPlatform()));
@@ -180,11 +181,11 @@ Index: Python-3.4.2/Python/sysmodule.c
180 SET_SYS_FROM_STRING("executable", 181 SET_SYS_FROM_STRING("executable",
181 PyUnicode_FromWideChar( 182 PyUnicode_FromWideChar(
182 Py_GetProgramFullPath(), -1)); 183 Py_GetProgramFullPath(), -1));
183Index: Python-3.4.2/setup.py 184Index: Python-3.5.0/setup.py
184=================================================================== 185===================================================================
185--- Python-3.4.2.orig/setup.py 186--- Python-3.5.0.orig/setup.py
186+++ Python-3.4.2/setup.py 187+++ Python-3.5.0/setup.py
187@@ -454,7 +454,7 @@ class PyBuildExt(build_ext): 188@@ -472,7 +472,7 @@ class PyBuildExt(build_ext):
188 # directories (i.e. '.' and 'Include') must be first. See issue 189 # directories (i.e. '.' and 'Include') must be first. See issue
189 # 10520. 190 # 10520.
190 if not cross_compiling: 191 if not cross_compiling:
@@ -193,7 +194,7 @@ Index: Python-3.4.2/setup.py
193 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') 194 add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
194 # only change this for cross builds for 3.3, issues on Mageia 195 # only change this for cross builds for 3.3, issues on Mageia
195 if cross_compiling: 196 if cross_compiling:
196@@ -512,8 +512,7 @@ class PyBuildExt(build_ext): 197@@ -530,8 +530,7 @@ class PyBuildExt(build_ext):
197 # be assumed that no additional -I,-L directives are needed. 198 # be assumed that no additional -I,-L directives are needed.
198 if not cross_compiling: 199 if not cross_compiling:
199 lib_dirs = self.compiler.library_dirs + [ 200 lib_dirs = self.compiler.library_dirs + [
@@ -203,7 +204,7 @@ Index: Python-3.4.2/setup.py
203 ] 204 ]
204 inc_dirs = self.compiler.include_dirs + ['/usr/include'] 205 inc_dirs = self.compiler.include_dirs + ['/usr/include']
205 else: 206 else:
206@@ -696,11 +695,11 @@ class PyBuildExt(build_ext): 207@@ -716,11 +715,11 @@ class PyBuildExt(build_ext):
207 elif curses_library: 208 elif curses_library:
208 readline_libs.append(curses_library) 209 readline_libs.append(curses_library)
209 elif self.compiler.find_library_file(lib_dirs + 210 elif self.compiler.find_library_file(lib_dirs +
@@ -217,10 +218,10 @@ Index: Python-3.4.2/setup.py
217 extra_link_args=readline_extra_link_args, 218 extra_link_args=readline_extra_link_args,
218 libraries=readline_libs) ) 219 libraries=readline_libs) )
219 else: 220 else:
220Index: Python-3.4.2/Lib/sysconfig.py 221Index: Python-3.5.0/Lib/sysconfig.py
221=================================================================== 222===================================================================
222--- Python-3.4.2.orig/Lib/sysconfig.py 223--- Python-3.5.0.orig/Lib/sysconfig.py
223+++ Python-3.4.2/Lib/sysconfig.py 224+++ Python-3.5.0/Lib/sysconfig.py
224@@ -20,10 +20,10 @@ __all__ = [ 225@@ -20,10 +20,10 @@ __all__ = [
225 226
226 _INSTALL_SCHEMES = { 227 _INSTALL_SCHEMES = {
@@ -263,13 +264,13 @@ Index: Python-3.4.2/Lib/sysconfig.py
263 'include': '{userbase}/include/python{py_version_short}', 264 'include': '{userbase}/include/python{py_version_short}',
264 'scripts': '{userbase}/bin', 265 'scripts': '{userbase}/bin',
265 'data': '{userbase}', 266 'data': '{userbase}',
266Index: Python-3.4.2/configure.ac 267Index: Python-3.5.0/configure.ac
267=================================================================== 268===================================================================
268--- Python-3.4.2.orig/configure.ac 269--- Python-3.5.0.orig/configure.ac
269+++ Python-3.4.2/configure.ac 270+++ Python-3.5.0/configure.ac
270@@ -791,6 +791,41 @@ esac 271@@ -858,6 +858,41 @@ PLATDIR=plat-$MACHDEP
271 MULTIARCH=$($CC --print-multiarch 2>/dev/null) 272 AC_SUBST(PLATDIR)
272 AC_SUBST(MULTIARCH) 273 AC_SUBST(PLATFORM_TRIPLET)
273 274
274+AC_SUBST(ARCH) 275+AC_SUBST(ARCH)
275+AC_MSG_CHECKING(ARCH) 276+AC_MSG_CHECKING(ARCH)
@@ -307,32 +308,5 @@ Index: Python-3.4.2/configure.ac
307+esac 308+esac
308+AC_MSG_RESULT($LIB) 309+AC_MSG_RESULT($LIB)
309 310
310 AC_SUBST(LIBRARY) 311 AC_MSG_CHECKING([for -Wl,--no-as-needed])
311 AC_MSG_CHECKING(LIBRARY) 312 save_LDFLAGS="$LDFLAGS"
312Index: Python-3.4.2/Lib/site.py
313===================================================================
314--- Python-3.4.2.orig/Lib/site.py
315+++ Python-3.4.2/Lib/site.py
316@@ -304,13 +304,19 @@ def getsitepackages(prefixes=None):
317 seen.add(prefix)
318
319 if os.sep == '/':
320- sitepackages.append(os.path.join(prefix, "lib",
321+ sitepackages.append(os.path.join(prefix, sys.lib,
322 "python" + sys.version[:3],
323 "site-packages"))
324- sitepackages.append(os.path.join(prefix, "lib", "site-python"))
325+ if sys.lib != "lib":
326+ sitepackages.append(os.path.join(prefix, "lib",
327+ "python" + sys.version[:3],
328+ "site-packages"))
329+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
330+ if sys.lib != "lib":
331+ sitepackages.append(os.path.join(prefix, sys.lib, "site-python"))
332 else:
333 sitepackages.append(prefix)
334- sitepackages.append(os.path.join(prefix, "lib", "site-packages"))
335+ sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))
336 if sys.platform == "darwin":
337 # for framework builds *only* we add the standard Apple
338 # locations.