diff options
Diffstat (limited to 'meta/recipes-devtools/python/python-native')
7 files changed, 0 insertions, 473 deletions
diff --git a/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch b/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch deleted file mode 100644 index 707ee596fa..0000000000 --- a/meta/recipes-devtools/python/python-native/0001-python-native-fix-one-do_populate_sysroot-warning.patch +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | From 6cbb7529cf7ff0da3ca649fb3486facd9620d625 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Thu, 25 Oct 2018 07:32:14 +0000 | ||
4 | Subject: [PATCH] python-native: fix one do_populate_sysroot warning | ||
5 | |||
6 | Fix below warning: | ||
7 | WARNING: Skipping RPATH /usr/lib64 as is a standard search path for | ||
8 | work/x86_64-linux/python-native/2.7.15-r1.1/recipe-sysroot-native/ | ||
9 | usr/lib/python2.7/lib-dynload/_bsddb.so | ||
10 | |||
11 | setup.py will check db.h under include_dirs, for native build, | ||
12 | /usr/lib64 will be insert to postion 0 of include_dirs, so | ||
13 | it's priority is higher then our sysroot, cause db.h sysroot | ||
14 | is ignored, and rpath set to /usr/lib64. and this cause warning | ||
15 | when do_populate_sysroot. use append to fix it. | ||
16 | |||
17 | Upstream-Status: Inappropriate [oe-specific] | ||
18 | |||
19 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
20 | |||
21 | --- | ||
22 | setup.py | 2 +- | ||
23 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
24 | |||
25 | diff --git a/setup.py b/setup.py | ||
26 | index a2c8127..22f9e23 100644 | ||
27 | --- a/setup.py | ||
28 | +++ b/setup.py | ||
29 | @@ -47,7 +47,7 @@ def add_dir_to_list(dirlist, dir): | ||
30 | else: | ||
31 | dir_exists = os.path.isdir(dir) | ||
32 | if dir_exists: | ||
33 | - dirlist.insert(0, dir) | ||
34 | + dirlist.append(dir) | ||
35 | |||
36 | MACOS_SDK_ROOT = None | ||
37 | |||
38 | -- | ||
39 | 2.17.1 | ||
40 | |||
diff --git a/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch b/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch deleted file mode 100644 index a39247ce70..0000000000 --- a/meta/recipes-devtools/python/python-native/10-distutils-fix-swig-parameter.patch +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | # Some versions of SWIG do not use the extension parameter. | ||
4 | # Make it optional. | ||
5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
6 | Index: Python-2.6.1/Lib/distutils/command/build_ext.py | ||
7 | =================================================================== | ||
8 | --- Python-2.6.1.orig/Lib/distutils/command/build_ext.py | ||
9 | +++ Python-2.6.1/Lib/distutils/command/build_ext.py | ||
10 | @@ -566,7 +566,7 @@ class build_ext (Command): | ||
11 | target_lang=language) | ||
12 | |||
13 | |||
14 | - def swig_sources (self, sources, extension): | ||
15 | + def swig_sources (self, sources, extension=None): | ||
16 | |||
17 | """Walk the list of source files in 'sources', looking for SWIG | ||
18 | interface (.i) files. Run SWIG on all that are found, and | ||
diff --git a/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch b/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch deleted file mode 100644 index c92469b9b6..0000000000 --- a/meta/recipes-devtools/python/python-native/11-distutils-never-modify-shebang-line.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | # Don't modify the she-bang line for a cross-build. | ||
4 | # Otherwise it points to our hostpython (which we do not want) | ||
5 | # | ||
6 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | ||
7 | |||
8 | Index: Python-2.6.1/Lib/distutils/command/build_scripts.py | ||
9 | =================================================================== | ||
10 | --- Python-2.6.1.orig/Lib/distutils/command/build_scripts.py | ||
11 | +++ Python-2.6.1/Lib/distutils/command/build_scripts.py | ||
12 | @@ -87,7 +87,7 @@ class build_scripts (Command): | ||
13 | continue | ||
14 | |||
15 | match = first_line_re.match(first_line) | ||
16 | - if match: | ||
17 | + if False: #match: | ||
18 | adjust = 1 | ||
19 | post_interp = match.group(1) or '' | ||
20 | |||
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch deleted file mode 100644 index af0f173c6d..0000000000 --- a/meta/recipes-devtools/python/python-native/multilib.patch +++ /dev/null | |||
@@ -1,235 +0,0 @@ | |||
1 | Rebased for Python 2.7.9 | ||
2 | |||
3 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
4 | |||
5 | 2011/09/29 | ||
6 | The python recipe building was failing because python-native | ||
7 | could not handle sys.lib var. sys.lib var is defined in the | ||
8 | multilib patch hence added this multilib.patch for python-native | ||
9 | recipe. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe-specific] | ||
12 | |||
13 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
14 | |||
15 | Index: Python-2.7.14/Include/pythonrun.h | ||
16 | =================================================================== | ||
17 | --- Python-2.7.14.orig/Include/pythonrun.h | ||
18 | +++ Python-2.7.14/Include/pythonrun.h | ||
19 | @@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); | ||
20 | /* In their own files */ | ||
21 | PyAPI_FUNC(const char *) Py_GetVersion(void); | ||
22 | PyAPI_FUNC(const char *) Py_GetPlatform(void); | ||
23 | +PyAPI_FUNC(const char *) Py_GetLib(void); | ||
24 | PyAPI_FUNC(const char *) Py_GetCopyright(void); | ||
25 | PyAPI_FUNC(const char *) Py_GetCompiler(void); | ||
26 | PyAPI_FUNC(const char *) Py_GetBuildInfo(void); | ||
27 | Index: Python-2.7.14/Lib/distutils/command/install.py | ||
28 | =================================================================== | ||
29 | --- Python-2.7.14.orig/Lib/distutils/command/install.py | ||
30 | +++ Python-2.7.14/Lib/distutils/command/install.py | ||
31 | @@ -22,6 +22,8 @@ from site import USER_BASE | ||
32 | from site import USER_SITE | ||
33 | |||
34 | |||
35 | +libname = sys.lib | ||
36 | + | ||
37 | if sys.version < "2.2": | ||
38 | WINDOWS_SCHEME = { | ||
39 | 'purelib': '$base', | ||
40 | @@ -42,7 +44,7 @@ else: | ||
41 | INSTALL_SCHEMES = { | ||
42 | 'unix_prefix': { | ||
43 | 'purelib': '$base/lib/python$py_version_short/site-packages', | ||
44 | - 'platlib': '$platbase/lib/python$py_version_short/site-packages', | ||
45 | + 'platlib': '$platbase/'+libname+'/python$py_version_short/site-packages', | ||
46 | 'headers': '$base/include/python$py_version_short/$dist_name', | ||
47 | 'scripts': '$base/bin', | ||
48 | 'data' : '$base', | ||
49 | Index: Python-2.7.14/Lib/pydoc.py | ||
50 | =================================================================== | ||
51 | --- Python-2.7.14.orig/Lib/pydoc.py | ||
52 | +++ Python-2.7.14/Lib/pydoc.py | ||
53 | @@ -375,7 +375,7 @@ class Doc: | ||
54 | docmodule = docclass = docroutine = docother = docproperty = docdata = fail | ||
55 | |||
56 | def getdocloc(self, object, | ||
57 | - basedir=os.path.join(sys.exec_prefix, "lib", | ||
58 | + basedir=os.path.join(sys.exec_prefix, "sys.lib", | ||
59 | "python"+sys.version[0:3])): | ||
60 | """Return the location of module docs or None""" | ||
61 | |||
62 | Index: Python-2.7.14/Lib/site.py | ||
63 | =================================================================== | ||
64 | --- Python-2.7.14.orig/Lib/site.py | ||
65 | +++ Python-2.7.14/Lib/site.py | ||
66 | @@ -288,13 +288,19 @@ def getsitepackages(): | ||
67 | if sys.platform in ('os2emx', 'riscos'): | ||
68 | sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) | ||
69 | elif os.sep == '/': | ||
70 | - sitepackages.append(os.path.join(prefix, "lib", | ||
71 | + sitepackages.append(os.path.join(prefix, sys.lib, | ||
72 | "python" + sys.version[:3], | ||
73 | "site-packages")) | ||
74 | - sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
75 | + if sys.lib != "lib": | ||
76 | + sitepackages.append(os.path.join(prefix, "lib", | ||
77 | + "python" + sys.version[:3], | ||
78 | + "site-packages")) | ||
79 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) | ||
80 | + if sys.lib != "lib": | ||
81 | + sitepackages.append(os.path.join(prefix, "lib", "site-python")) | ||
82 | else: | ||
83 | sitepackages.append(prefix) | ||
84 | - sitepackages.append(os.path.join(prefix, "lib", "site-packages")) | ||
85 | + sitepackages.append(os.path.join(prefix, sys.lib, "site-packages")) | ||
86 | return sitepackages | ||
87 | |||
88 | def addsitepackages(known_paths): | ||
89 | Index: Python-2.7.14/Lib/test/test_dl.py | ||
90 | =================================================================== | ||
91 | --- Python-2.7.14.orig/Lib/test/test_dl.py | ||
92 | +++ Python-2.7.14/Lib/test/test_dl.py | ||
93 | @@ -4,10 +4,11 @@ | ||
94 | import unittest | ||
95 | from test.test_support import verbose, import_module | ||
96 | dl = import_module('dl', deprecated=True) | ||
97 | +import sys | ||
98 | |||
99 | sharedlibs = [ | ||
100 | - ('/usr/lib/libc.so', 'getpid'), | ||
101 | - ('/lib/libc.so.6', 'getpid'), | ||
102 | + ('/usr/'+sys.lib+'/libc.so', 'getpid'), | ||
103 | + ('/'+sys.lib+'/libc.so.6', 'getpid'), | ||
104 | ('/usr/bin/cygwin1.dll', 'getpid'), | ||
105 | ('/usr/lib/libc.dylib', 'getpid'), | ||
106 | ] | ||
107 | Index: Python-2.7.14/Lib/trace.py | ||
108 | =================================================================== | ||
109 | --- Python-2.7.14.orig/Lib/trace.py | ||
110 | +++ Python-2.7.14/Lib/trace.py | ||
111 | @@ -754,10 +754,10 @@ def main(argv=None): | ||
112 | # should I also call expanduser? (after all, could use $HOME) | ||
113 | |||
114 | s = s.replace("$prefix", | ||
115 | - os.path.join(sys.prefix, "lib", | ||
116 | + os.path.join(sys.prefix, sys.lib, | ||
117 | "python" + sys.version[:3])) | ||
118 | s = s.replace("$exec_prefix", | ||
119 | - os.path.join(sys.exec_prefix, "lib", | ||
120 | + os.path.join(sys.exec_prefix, sys.lib, | ||
121 | "python" + sys.version[:3])) | ||
122 | s = os.path.normpath(s) | ||
123 | ignore_dirs.append(s) | ||
124 | Index: Python-2.7.14/Makefile.pre.in | ||
125 | =================================================================== | ||
126 | --- Python-2.7.14.orig/Makefile.pre.in | ||
127 | +++ Python-2.7.14/Makefile.pre.in | ||
128 | @@ -91,6 +91,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG | ||
129 | |||
130 | # Machine-dependent subdirectories | ||
131 | MACHDEP= @MACHDEP@ | ||
132 | +LIB= @LIB@ | ||
133 | |||
134 | # Multiarch directory (may be empty) | ||
135 | MULTIARCH= @MULTIARCH@ | ||
136 | @@ -110,7 +111,7 @@ LIBDIR= @libdir@ | ||
137 | MANDIR= @mandir@ | ||
138 | INCLUDEDIR= @includedir@ | ||
139 | CONFINCLUDEDIR= $(exec_prefix)/include | ||
140 | -SCRIPTDIR= $(prefix)/lib | ||
141 | +SCRIPTDIR= $(prefix)/@LIB@ | ||
142 | |||
143 | # Detailed destination directories | ||
144 | BINLIBDEST= $(LIBDIR)/python$(VERSION) | ||
145 | @@ -644,6 +645,7 @@ Modules/getpath.o: $(srcdir)/Modules/get | ||
146 | -DEXEC_PREFIX='"$(exec_prefix)"' \ | ||
147 | -DVERSION='"$(VERSION)"' \ | ||
148 | -DVPATH='"$(VPATH)"' \ | ||
149 | + -DLIB='"$(LIB)"' \ | ||
150 | -o $@ $(srcdir)/Modules/getpath.c | ||
151 | |||
152 | Modules/python.o: $(srcdir)/Modules/python.c | ||
153 | @@ -692,7 +694,7 @@ regen-ast: | ||
154 | Python/compile.o Python/symtable.o Python/ast.o: $(srcdir)/Include/graminit.h $(srcdir)/Include/Python-ast.h | ||
155 | |||
156 | Python/getplatform.o: $(srcdir)/Python/getplatform.c | ||
157 | - $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -o $@ $(srcdir)/Python/getplatform.c | ||
158 | + $(CC) -c $(PY_CFLAGS) -DPLATFORM='"$(MACHDEP)"' -DLIB='"$(LIB)"' -o $@ $(srcdir)/Python/getplatform.c | ||
159 | |||
160 | Python/importdl.o: $(srcdir)/Python/importdl.c | ||
161 | $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c | ||
162 | Index: Python-2.7.14/Modules/getpath.c | ||
163 | =================================================================== | ||
164 | --- Python-2.7.14.orig/Modules/getpath.c | ||
165 | +++ Python-2.7.14/Modules/getpath.c | ||
166 | @@ -100,6 +100,13 @@ | ||
167 | #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined" | ||
168 | #endif | ||
169 | |||
170 | +#define LIB_PYTHON LIB "/python" VERSION | ||
171 | + | ||
172 | +#ifndef PYTHONPATH | ||
173 | +#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ | ||
174 | + EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" | ||
175 | +#endif | ||
176 | + | ||
177 | #ifndef LANDMARK | ||
178 | #define LANDMARK "os.py" | ||
179 | #endif | ||
180 | @@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1]; | ||
181 | static char exec_prefix[MAXPATHLEN+1]; | ||
182 | static char progpath[MAXPATHLEN+1]; | ||
183 | static char *module_search_path = NULL; | ||
184 | -static char lib_python[] = "lib/python" VERSION; | ||
185 | +static char lib_python[] = LIB_PYTHON; | ||
186 | |||
187 | static void | ||
188 | reduce(char *dir) | ||
189 | Index: Python-2.7.14/Python/getplatform.c | ||
190 | =================================================================== | ||
191 | --- Python-2.7.14.orig/Python/getplatform.c | ||
192 | +++ Python-2.7.14/Python/getplatform.c | ||
193 | @@ -10,3 +10,13 @@ Py_GetPlatform(void) | ||
194 | { | ||
195 | return PLATFORM; | ||
196 | } | ||
197 | + | ||
198 | +#ifndef LIB | ||
199 | +#define LIB "lib" | ||
200 | +#endif | ||
201 | + | ||
202 | +const char * | ||
203 | +Py_GetLib(void) | ||
204 | +{ | ||
205 | + return LIB; | ||
206 | +} | ||
207 | Index: Python-2.7.14/Python/sysmodule.c | ||
208 | =================================================================== | ||
209 | --- Python-2.7.14.orig/Python/sysmodule.c | ||
210 | +++ Python-2.7.14/Python/sysmodule.c | ||
211 | @@ -1437,6 +1437,8 @@ _PySys_Init(void) | ||
212 | PyString_FromString(Py_GetCopyright())); | ||
213 | SET_SYS_FROM_STRING("platform", | ||
214 | PyString_FromString(Py_GetPlatform())); | ||
215 | + SET_SYS_FROM_STRING("lib", | ||
216 | + PyString_FromString(Py_GetLib())); | ||
217 | SET_SYS_FROM_STRING("executable", | ||
218 | PyString_FromString(Py_GetProgramFullPath())); | ||
219 | SET_SYS_FROM_STRING("prefix", | ||
220 | Index: Python-2.7.14/configure.ac | ||
221 | =================================================================== | ||
222 | --- Python-2.7.14.orig/configure.ac | ||
223 | +++ Python-2.7.14/configure.ac | ||
224 | @@ -758,6 +758,11 @@ SunOS*) | ||
225 | ;; | ||
226 | esac | ||
227 | |||
228 | +AC_SUBST(LIB) | ||
229 | +AC_MSG_CHECKING(LIB) | ||
230 | +LIB=`basename ${libdir}` | ||
231 | +AC_MSG_RESULT($LIB) | ||
232 | + | ||
233 | |||
234 | AC_SUBST(LIBRARY) | ||
235 | AC_MSG_CHECKING(LIBRARY) | ||
diff --git a/meta/recipes-devtools/python/python-native/nohostlibs.patch b/meta/recipes-devtools/python/python-native/nohostlibs.patch deleted file mode 100644 index 078060b49e..0000000000 --- a/meta/recipes-devtools/python/python-native/nohostlibs.patch +++ /dev/null | |||
@@ -1,54 +0,0 @@ | |||
1 | Upstream-Status: Inappropriate [embedded specific] | ||
2 | |||
3 | 2014/12/15 | ||
4 | Rebased for python-2.7.9 | ||
5 | Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> | ||
6 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
7 | |||
8 | Index: Python-2.7.9/setup.py | ||
9 | =================================================================== | ||
10 | --- Python-2.7.9.orig/setup.py | ||
11 | +++ Python-2.7.9/setup.py | ||
12 | @@ -439,9 +439,9 @@ class PyBuildExt(build_ext): | ||
13 | |||
14 | def detect_modules(self): | ||
15 | # Ensure that /usr/local is always used | ||
16 | - if not cross_compiling: | ||
17 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
18 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
19 | + # if not cross_compiling: | ||
20 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | ||
21 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | ||
22 | if cross_compiling: | ||
23 | self.add_gcc_paths() | ||
24 | self.add_multiarch_paths() | ||
25 | @@ -480,15 +480,15 @@ class PyBuildExt(build_ext): | ||
26 | for directory in reversed(options.dirs): | ||
27 | add_dir_to_list(dir_list, directory) | ||
28 | |||
29 | - if os.path.normpath(sys.prefix) != '/usr' \ | ||
30 | - and not sysconfig.get_config_var('PYTHONFRAMEWORK'): | ||
31 | + #if os.path.normpath(sys.prefix) != '/usr' \ | ||
32 | + #and not sysconfig.get_config_var('PYTHONFRAMEWORK'): | ||
33 | # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework | ||
34 | # (PYTHONFRAMEWORK is set) to avoid # linking problems when | ||
35 | # building a framework with different architectures than | ||
36 | # the one that is currently installed (issue #7473) | ||
37 | - add_dir_to_list(self.compiler.library_dirs, | ||
38 | + add_dir_to_list(self.compiler.library_dirs, | ||
39 | sysconfig.get_config_var("LIBDIR")) | ||
40 | - add_dir_to_list(self.compiler.include_dirs, | ||
41 | + add_dir_to_list(self.compiler.include_dirs, | ||
42 | sysconfig.get_config_var("INCLUDEDIR")) | ||
43 | |||
44 | try: | ||
45 | @@ -761,8 +761,7 @@ class PyBuildExt(build_ext): | ||
46 | pass # Issue 7384: Already linked against curses or tinfo. | ||
47 | elif curses_library: | ||
48 | readline_libs.append(curses_library) | ||
49 | - elif self.compiler.find_library_file(lib_dirs + | ||
50 | - ['/usr/lib/termcap'], | ||
51 | + elif self.compiler.find_library_file(lib_dirs, | ||
52 | 'termcap'): | ||
53 | readline_libs.append('termcap') | ||
54 | exts.append( Extension('readline', ['readline.c'], | ||
diff --git a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch b/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch deleted file mode 100644 index 202aaf1069..0000000000 --- a/meta/recipes-devtools/python/python-native/revert_use_of_sysconfigdata.patch +++ /dev/null | |||
@@ -1,86 +0,0 @@ | |||
1 | On older versions of Python, sysconfig read the data from both the Makefile and | ||
2 | the Python.h file generated at build time, created dictionaries with their variables | ||
3 | and used those when using get_config_var(), now it uses _sysconfigdata.build_time_vars[] | ||
4 | which contains information from the HOST, erroneous in our case, this patch reverts this | ||
5 | behavior and uses Python.h and Makefile to get information. | ||
6 | |||
7 | Upstream-Status: Inappropriate [oe-specific] | ||
8 | |||
9 | Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> | ||
10 | |||
11 | Index: Python-2.7.9/Lib/distutils/sysconfig.py | ||
12 | =================================================================== | ||
13 | --- Python-2.7.9.orig/Lib/distutils/sysconfig.py | ||
14 | +++ Python-2.7.9/Lib/distutils/sysconfig.py | ||
15 | @@ -401,12 +401,66 @@ _config_vars = None | ||
16 | |||
17 | def _init_posix(): | ||
18 | """Initialize the module as appropriate for POSIX systems.""" | ||
19 | - # _sysconfigdata is generated at build time, see the sysconfig module | ||
20 | - from _sysconfigdata import build_time_vars | ||
21 | - global _config_vars | ||
22 | - _config_vars = {} | ||
23 | - _config_vars.update(build_time_vars) | ||
24 | + g = {} | ||
25 | + # load the installed Makefile: | ||
26 | + try: | ||
27 | + filename = get_makefile_filename() | ||
28 | + parse_makefile(filename, g) | ||
29 | + except IOError, msg: | ||
30 | + my_msg = "invalid Python installation: unable to open %s" % filename | ||
31 | + if hasattr(msg, "strerror"): | ||
32 | + my_msg = my_msg + " (%s)" % msg.strerror | ||
33 | + | ||
34 | + raise DistutilsPlatformError(my_msg) | ||
35 | + | ||
36 | + # load the installed pyconfig.h: | ||
37 | + try: | ||
38 | + filename = get_config_h_filename() | ||
39 | + parse_config_h(file(filename), g) | ||
40 | + except IOError, msg: | ||
41 | + my_msg = "invalid Python installation: unable to open %s" % filename | ||
42 | + if hasattr(msg, "strerror"): | ||
43 | + my_msg = my_msg + " (%s)" % msg.strerror | ||
44 | + | ||
45 | + raise DistutilsPlatformError(my_msg) | ||
46 | + | ||
47 | + # On AIX, there are wrong paths to the linker scripts in the Makefile | ||
48 | + # -- these paths are relative to the Python source, but when installed | ||
49 | + # the scripts are in another directory. | ||
50 | + if python_build: | ||
51 | + g['LDSHARED'] = g['BLDSHARED'] | ||
52 | |||
53 | + elif get_python_version() < '2.1': | ||
54 | + # The following two branches are for 1.5.2 compatibility. | ||
55 | + if sys.platform == 'aix4': # what about AIX 3.x ? | ||
56 | + # Linker script is in the config directory, not in Modules as the | ||
57 | + # Makefile says. | ||
58 | + python_lib = get_python_lib(standard_lib=1) | ||
59 | + ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix') | ||
60 | + python_exp = os.path.join(python_lib, 'config', 'python.exp') | ||
61 | + | ||
62 | + g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp) | ||
63 | + | ||
64 | + elif sys.platform == 'beos': | ||
65 | + # Linker script is in the config directory. In the Makefile it is | ||
66 | + # relative to the srcdir, which after installation no longer makes | ||
67 | + # sense. | ||
68 | + python_lib = get_python_lib(standard_lib=1) | ||
69 | + linkerscript_path = string.split(g['LDSHARED'])[0] | ||
70 | + linkerscript_name = os.path.basename(linkerscript_path) | ||
71 | + linkerscript = os.path.join(python_lib, 'config', | ||
72 | + linkerscript_name) | ||
73 | + | ||
74 | + # XXX this isn't the right place to do this: adding the Python | ||
75 | + # library to the link, if needed, should be in the "build_ext" | ||
76 | + # command. (It's also needed for non-MS compilers on Windows, and | ||
77 | + # it's taken care of for them by the 'build_ext.get_libraries()' | ||
78 | + # method.) | ||
79 | + g['LDSHARED'] = ("%s -L%s/lib -lpython%s" % | ||
80 | + (linkerscript, PREFIX, get_python_version())) | ||
81 | + | ||
82 | + global _config_vars | ||
83 | + _config_vars = g | ||
84 | |||
85 | def _init_nt(): | ||
86 | """Initialize the module as appropriate for NT""" | ||
diff --git a/meta/recipes-devtools/python/python-native/unixccompiler.patch b/meta/recipes-devtools/python/python-native/unixccompiler.patch deleted file mode 100644 index 4502829129..0000000000 --- a/meta/recipes-devtools/python/python-native/unixccompiler.patch +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information. | ||
4 | This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name. | ||
5 | |||
6 | Signed-off-by: Mei Lei <lei.mei@intel.com> | ||
7 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
8 | Index: Python-2.7.2/Lib/distutils/unixccompiler.py | ||
9 | =================================================================== | ||
10 | --- Python-2.7.2.orig/Lib/distutils/unixccompiler.py 2011-11-24 13:51:10.539998722 -0800 | ||
11 | +++ Python-2.7.2/Lib/distutils/unixccompiler.py 2011-11-24 15:54:36.872137766 -0800 | ||
12 | @@ -282,7 +282,7 @@ | ||
13 | # this time, there's no way to determine this information from | ||
14 | # the configuration data stored in the Python installation, so | ||
15 | # we use this hack. | ||
16 | - compiler = os.path.basename(sysconfig.get_config_var("CC")) | ||
17 | + compiler = sysconfig.get_config_var("CC") | ||
18 | if sys.platform[:6] == "darwin": | ||
19 | # MacOSX's linker doesn't understand the -R flag at all | ||
20 | return "-L" + dir | ||