summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python-native
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python-native')
-rw-r--r--meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch27
-rw-r--r--meta/recipes-devtools/python/python-native/debug.patch19
-rw-r--r--meta/recipes-devtools/python/python-native/multilib.patch102
3 files changed, 64 insertions, 84 deletions
diff --git a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch b/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
deleted file mode 100644
index 5279e7c3b4..0000000000
--- a/meta/recipes-devtools/python/python-native/avoid_parallel_make_races_on_pgen.patch
+++ /dev/null
@@ -1,27 +0,0 @@
1Upstream-Status: Pending
2
3Avoids parallel make races linking errors when making Parser/PGEN
4
5- Implements Richard Purdie's idea
6
7Signed-Off-By: Richard Purdie <richard.purdie@linuxfoundation.org>
8Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
9
10Index: Python-2.7.9/Makefile.pre.in
11===================================================================
12--- Python-2.7.9.orig/Makefile.pre.in
13+++ Python-2.7.9/Makefile.pre.in
14@@ -610,12 +610,10 @@ Modules/grpmodule.o: $(srcdir)/Modules/g
15
16 Modules/pwdmodule.o: $(srcdir)/Modules/pwdmodule.c $(srcdir)/Modules/posixmodule.h
17
18-$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
19+$(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) $(PGEN)
20 @$(MKDIR_P) Include
21- $(MAKE) $(PGEN)
22 $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
23 $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
24- $(MAKE) $(GRAMMAR_H)
25 touch $(GRAMMAR_C)
26
27 $(PGEN): $(PGENOBJS)
diff --git a/meta/recipes-devtools/python/python-native/debug.patch b/meta/recipes-devtools/python/python-native/debug.patch
index 5ec10d6b20..c2b20e0a6e 100644
--- a/meta/recipes-devtools/python/python-native/debug.patch
+++ b/meta/recipes-devtools/python/python-native/debug.patch
@@ -1,24 +1,29 @@
1Upstream-Status: Pending 1Upstream-Status: Pending
2 2
3Index: Python-2.6.1/Lib/distutils/unixccompiler.py 3Rebased for python-2.7.12
4Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
5Index: Python-2.7.12/Lib/distutils/unixccompiler.py
4=================================================================== 6===================================================================
5--- Python-2.6.1.orig/Lib/distutils/unixccompiler.py 2009-11-13 16:04:54.000000000 +0000 7--- Python-2.7.12.orig/Lib/distutils/unixccompiler.py
6+++ Python-2.6.1/Lib/distutils/unixccompiler.py 2009-11-13 16:06:27.000000000 +0000 8+++ Python-2.7.12/Lib/distutils/unixccompiler.py
7@@ -300,6 +300,8 @@ 9@@ -278,6 +278,8 @@ class UnixCCompiler(CCompiler):
8 dylib_f = self.library_filename(lib, lib_type='dylib') 10
9 static_f = self.library_filename(lib, lib_type='static') 11
10 12
11+ print "Looking in %s for %s" % (lib, dirs) 13+ print "Looking in %s for %s" % (lib, dirs)
12+ 14+
13 for dir in dirs: 15 for dir in dirs:
14 shared = os.path.join(dir, shared_f) 16 shared = os.path.join(dir, shared_f)
15 dylib = os.path.join(dir, dylib_f) 17 dylib = os.path.join(dir, dylib_f)
16@@ -309,10 +311,13 @@ 18@@ -298,12 +300,16 @@ class UnixCCompiler(CCompiler):
17 # assuming that *all* Unix C compilers do. And of course I'm 19 # assuming that *all* Unix C compilers do. And of course I'm
18 # ignoring even GCC's "-static" option. So sue me. 20 # ignoring even GCC's "-static" option. So sue me.
19 if os.path.exists(dylib): 21 if os.path.exists(dylib):
20+ print "Found %s" % (dylib) 22+ print "Found %s" % (dylib)
21 return dylib 23 return dylib
24 elif os.path.exists(xcode_stub):
25+ print "Found %s" % (xcode_stub)
26 return xcode_stub
22 elif os.path.exists(shared): 27 elif os.path.exists(shared):
23+ print "Found %s" % (shared) 28+ print "Found %s" % (shared)
24 return shared 29 return shared
diff --git a/meta/recipes-devtools/python/python-native/multilib.patch b/meta/recipes-devtools/python/python-native/multilib.patch
index 8ca89e7c51..fa123c56bc 100644
--- a/meta/recipes-devtools/python/python-native/multilib.patch
+++ b/meta/recipes-devtools/python/python-native/multilib.patch
@@ -1,6 +1,6 @@
1Rebased for Python 2.7.9 1Rebased for Python 2.7.9
2 2
3Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com> 3Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
4 4
52011/09/29 52011/09/29
6The python recipe building was failing because python-native 6The python recipe building was failing because python-native
@@ -10,12 +10,14 @@ recipe.
10 10
11Upstream-Status: Inappropriate [oe-specific] 11Upstream-Status: Inappropriate [oe-specific]
12 12
13Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com> 13Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
14 14
15Index: Python-2.7.9/Include/pythonrun.h 15Rebased for python-2.7.12
16Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
17Index: Python-2.7.12/Include/pythonrun.h
16=================================================================== 18===================================================================
17--- Python-2.7.9.orig/Include/pythonrun.h 19--- Python-2.7.12.orig/Include/pythonrun.h
18+++ Python-2.7.9/Include/pythonrun.h 20+++ Python-2.7.12/Include/pythonrun.h
19@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void); 21@@ -108,6 +108,7 @@ PyAPI_FUNC(char *) Py_GetPath(void);
20 /* In their own files */ 22 /* In their own files */
21 PyAPI_FUNC(const char *) Py_GetVersion(void); 23 PyAPI_FUNC(const char *) Py_GetVersion(void);
@@ -24,10 +26,10 @@ Index: Python-2.7.9/Include/pythonrun.h
24 PyAPI_FUNC(const char *) Py_GetCopyright(void); 26 PyAPI_FUNC(const char *) Py_GetCopyright(void);
25 PyAPI_FUNC(const char *) Py_GetCompiler(void); 27 PyAPI_FUNC(const char *) Py_GetCompiler(void);
26 PyAPI_FUNC(const char *) Py_GetBuildInfo(void); 28 PyAPI_FUNC(const char *) Py_GetBuildInfo(void);
27Index: Python-2.7.9/Lib/distutils/command/install.py 29Index: Python-2.7.12/Lib/distutils/command/install.py
28=================================================================== 30===================================================================
29--- Python-2.7.9.orig/Lib/distutils/command/install.py 31--- Python-2.7.12.orig/Lib/distutils/command/install.py
30+++ Python-2.7.9/Lib/distutils/command/install.py 32+++ Python-2.7.12/Lib/distutils/command/install.py
31@@ -22,6 +22,8 @@ from site import USER_BASE 33@@ -22,6 +22,8 @@ from site import USER_BASE
32 from site import USER_SITE 34 from site import USER_SITE
33 35
@@ -46,11 +48,11 @@ Index: Python-2.7.9/Lib/distutils/command/install.py
46 'headers': '$base/include/python$py_version_short/$dist_name', 48 'headers': '$base/include/python$py_version_short/$dist_name',
47 'scripts': '$base/bin', 49 'scripts': '$base/bin',
48 'data' : '$base', 50 'data' : '$base',
49Index: Python-2.7.9/Lib/pydoc.py 51Index: Python-2.7.12/Lib/pydoc.py
50=================================================================== 52===================================================================
51--- Python-2.7.9.orig/Lib/pydoc.py 53--- Python-2.7.12.orig/Lib/pydoc.py
52+++ Python-2.7.9/Lib/pydoc.py 54+++ Python-2.7.12/Lib/pydoc.py
53@@ -383,7 +383,7 @@ class Doc: 55@@ -384,7 +384,7 @@ class Doc:
54 56
55 docloc = os.environ.get("PYTHONDOCS", 57 docloc = os.environ.get("PYTHONDOCS",
56 "http://docs.python.org/library") 58 "http://docs.python.org/library")
@@ -59,10 +61,10 @@ Index: Python-2.7.9/Lib/pydoc.py
59 "python"+sys.version[0:3]) 61 "python"+sys.version[0:3])
60 if (isinstance(object, type(os)) and 62 if (isinstance(object, type(os)) and
61 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp', 63 (object.__name__ in ('errno', 'exceptions', 'gc', 'imp',
62Index: Python-2.7.9/Lib/site.py 64Index: Python-2.7.12/Lib/site.py
63=================================================================== 65===================================================================
64--- Python-2.7.9.orig/Lib/site.py 66--- Python-2.7.12.orig/Lib/site.py
65+++ Python-2.7.9/Lib/site.py 67+++ Python-2.7.12/Lib/site.py
66@@ -288,13 +288,19 @@ def getsitepackages(): 68@@ -288,13 +288,19 @@ def getsitepackages():
67 if sys.platform in ('os2emx', 'riscos'): 69 if sys.platform in ('os2emx', 'riscos'):
68 sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) 70 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
@@ -86,10 +88,10 @@ Index: Python-2.7.9/Lib/site.py
86 if sys.platform == "darwin": 88 if sys.platform == "darwin":
87 # for framework builds *only* we add the standard Apple 89 # for framework builds *only* we add the standard Apple
88 # locations. 90 # locations.
89Index: Python-2.7.9/Lib/test/test_dl.py 91Index: Python-2.7.12/Lib/test/test_dl.py
90=================================================================== 92===================================================================
91--- Python-2.7.9.orig/Lib/test/test_dl.py 93--- Python-2.7.12.orig/Lib/test/test_dl.py
92+++ Python-2.7.9/Lib/test/test_dl.py 94+++ Python-2.7.12/Lib/test/test_dl.py
93@@ -4,10 +4,11 @@ 95@@ -4,10 +4,11 @@
94 import unittest 96 import unittest
95 from test.test_support import verbose, import_module 97 from test.test_support import verbose, import_module
@@ -104,10 +106,10 @@ Index: Python-2.7.9/Lib/test/test_dl.py
104 ('/usr/bin/cygwin1.dll', 'getpid'), 106 ('/usr/bin/cygwin1.dll', 'getpid'),
105 ('/usr/lib/libc.dylib', 'getpid'), 107 ('/usr/lib/libc.dylib', 'getpid'),
106 ] 108 ]
107Index: Python-2.7.9/Lib/trace.py 109Index: Python-2.7.12/Lib/trace.py
108=================================================================== 110===================================================================
109--- Python-2.7.9.orig/Lib/trace.py 111--- Python-2.7.12.orig/Lib/trace.py
110+++ Python-2.7.9/Lib/trace.py 112+++ Python-2.7.12/Lib/trace.py
111@@ -754,10 +754,10 @@ def main(argv=None): 113@@ -754,10 +754,10 @@ def main(argv=None):
112 # should I also call expanduser? (after all, could use $HOME) 114 # should I also call expanduser? (after all, could use $HOME)
113 115
@@ -121,11 +123,11 @@ Index: Python-2.7.9/Lib/trace.py
121 "python" + sys.version[:3])) 123 "python" + sys.version[:3]))
122 s = os.path.normpath(s) 124 s = os.path.normpath(s)
123 ignore_dirs.append(s) 125 ignore_dirs.append(s)
124Index: Python-2.7.9/Makefile.pre.in 126Index: Python-2.7.12/Makefile.pre.in
125=================================================================== 127===================================================================
126--- Python-2.7.9.orig/Makefile.pre.in 128--- Python-2.7.12.orig/Makefile.pre.in
127+++ Python-2.7.9/Makefile.pre.in 129+++ Python-2.7.12/Makefile.pre.in
128@@ -87,6 +87,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG 130@@ -92,6 +92,7 @@ PY_CFLAGS= $(CFLAGS) $(CPPFLAGS) $(CFLAG
129 131
130 # Machine-dependent subdirectories 132 # Machine-dependent subdirectories
131 MACHDEP= @MACHDEP@ 133 MACHDEP= @MACHDEP@
@@ -133,7 +135,7 @@ Index: Python-2.7.9/Makefile.pre.in
133 135
134 # Multiarch directory (may be empty) 136 # Multiarch directory (may be empty)
135 MULTIARCH= @MULTIARCH@ 137 MULTIARCH= @MULTIARCH@
136@@ -106,7 +107,7 @@ LIBDIR= @libdir@ 138@@ -111,7 +112,7 @@ LIBDIR= @libdir@
137 MANDIR= @mandir@ 139 MANDIR= @mandir@
138 INCLUDEDIR= @includedir@ 140 INCLUDEDIR= @includedir@
139 CONFINCLUDEDIR= $(exec_prefix)/include 141 CONFINCLUDEDIR= $(exec_prefix)/include
@@ -142,7 +144,7 @@ Index: Python-2.7.9/Makefile.pre.in
142 144
143 # Detailed destination directories 145 # Detailed destination directories
144 BINLIBDEST= $(LIBDIR)/python$(VERSION) 146 BINLIBDEST= $(LIBDIR)/python$(VERSION)
145@@ -597,6 +598,7 @@ Modules/getpath.o: $(srcdir)/Modules/get 147@@ -669,6 +670,7 @@ Modules/getpath.o: $(srcdir)/Modules/get
146 -DEXEC_PREFIX='"$(exec_prefix)"' \ 148 -DEXEC_PREFIX='"$(exec_prefix)"' \
147 -DVERSION='"$(VERSION)"' \ 149 -DVERSION='"$(VERSION)"' \
148 -DVPATH='"$(VPATH)"' \ 150 -DVPATH='"$(VPATH)"' \
@@ -150,7 +152,7 @@ Index: Python-2.7.9/Makefile.pre.in
150 -o $@ $(srcdir)/Modules/getpath.c 152 -o $@ $(srcdir)/Modules/getpath.c
151 153
152 Modules/python.o: $(srcdir)/Modules/python.c 154 Modules/python.o: $(srcdir)/Modules/python.c
153@@ -639,7 +641,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES) 155@@ -720,7 +722,7 @@ $(AST_C): $(AST_ASDL) $(ASDLGEN_FILES)
154 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H) 156 Python/compile.o Python/symtable.o Python/ast.o: $(GRAMMAR_H) $(AST_H)
155 157
156 Python/getplatform.o: $(srcdir)/Python/getplatform.c 158 Python/getplatform.o: $(srcdir)/Python/getplatform.c
@@ -159,25 +161,25 @@ Index: Python-2.7.9/Makefile.pre.in
159 161
160 Python/importdl.o: $(srcdir)/Python/importdl.c 162 Python/importdl.o: $(srcdir)/Python/importdl.c
161 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c 163 $(CC) -c $(PY_CFLAGS) -I$(DLINCLDIR) -o $@ $(srcdir)/Python/importdl.c
162Index: Python-2.7.9/Modules/getpath.c 164Index: Python-2.7.12/Modules/getpath.c
163=================================================================== 165===================================================================
164--- Python-2.7.9.orig/Modules/getpath.c 166--- Python-2.7.12.orig/Modules/getpath.c
165+++ Python-2.7.9/Modules/getpath.c 167+++ Python-2.7.12/Modules/getpath.c
166@@ -116,9 +116,11 @@ 168@@ -100,6 +100,13 @@
167 #define EXEC_PREFIX PREFIX 169 #error "PREFIX, EXEC_PREFIX, VERSION, and VPATH must be constant defined"
168 #endif 170 #endif
169 171
170+#define LIB_PYTHON LIB "/python" VERSION 172+#define LIB_PYTHON LIB "/python" VERSION
171+ 173+
172 #ifndef PYTHONPATH 174+#ifndef PYTHONPATH
173-#define PYTHONPATH PREFIX "/lib/python" VERSION ":" \
174- EXEC_PREFIX "/lib/python" VERSION "/lib-dynload"
175+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \ 175+#define PYTHONPATH PREFIX "/" LIB_PYTHON ":" \
176+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload" 176+ EXEC_PREFIX "/" LIB_PYTHON "/lib-dynload"
177 #endif 177+#endif
178 178+
179 #ifndef LANDMARK 179 #ifndef LANDMARK
180@@ -129,7 +131,7 @@ static char prefix[MAXPATHLEN+1]; 180 #define LANDMARK "os.py"
181 #endif
182@@ -108,7 +115,7 @@ static char prefix[MAXPATHLEN+1];
181 static char exec_prefix[MAXPATHLEN+1]; 183 static char exec_prefix[MAXPATHLEN+1];
182 static char progpath[MAXPATHLEN+1]; 184 static char progpath[MAXPATHLEN+1];
183 static char *module_search_path = NULL; 185 static char *module_search_path = NULL;
@@ -186,10 +188,10 @@ Index: Python-2.7.9/Modules/getpath.c
186 188
187 static void 189 static void
188 reduce(char *dir) 190 reduce(char *dir)
189Index: Python-2.7.9/Python/getplatform.c 191Index: Python-2.7.12/Python/getplatform.c
190=================================================================== 192===================================================================
191--- Python-2.7.9.orig/Python/getplatform.c 193--- Python-2.7.12.orig/Python/getplatform.c
192+++ Python-2.7.9/Python/getplatform.c 194+++ Python-2.7.12/Python/getplatform.c
193@@ -10,3 +10,13 @@ Py_GetPlatform(void) 195@@ -10,3 +10,13 @@ Py_GetPlatform(void)
194 { 196 {
195 return PLATFORM; 197 return PLATFORM;
@@ -204,10 +206,10 @@ Index: Python-2.7.9/Python/getplatform.c
204+{ 206+{
205+ return LIB; 207+ return LIB;
206+} 208+}
207Index: Python-2.7.9/Python/sysmodule.c 209Index: Python-2.7.12/Python/sysmodule.c
208=================================================================== 210===================================================================
209--- Python-2.7.9.orig/Python/sysmodule.c 211--- Python-2.7.12.orig/Python/sysmodule.c
210+++ Python-2.7.9/Python/sysmodule.c 212+++ Python-2.7.12/Python/sysmodule.c
211@@ -1437,6 +1437,8 @@ _PySys_Init(void) 213@@ -1437,6 +1437,8 @@ _PySys_Init(void)
212 PyString_FromString(Py_GetCopyright())); 214 PyString_FromString(Py_GetCopyright()));
213 SET_SYS_FROM_STRING("platform", 215 SET_SYS_FROM_STRING("platform",
@@ -217,11 +219,11 @@ Index: Python-2.7.9/Python/sysmodule.c
217 SET_SYS_FROM_STRING("executable", 219 SET_SYS_FROM_STRING("executable",
218 PyString_FromString(Py_GetProgramFullPath())); 220 PyString_FromString(Py_GetProgramFullPath()));
219 SET_SYS_FROM_STRING("prefix", 221 SET_SYS_FROM_STRING("prefix",
220Index: Python-2.7.9/configure.ac 222Index: Python-2.7.12/configure.ac
221=================================================================== 223===================================================================
222--- Python-2.7.9.orig/configure.ac 224--- Python-2.7.12.orig/configure.ac
223+++ Python-2.7.9/configure.ac 225+++ Python-2.7.12/configure.ac
224@@ -736,6 +736,11 @@ SunOS*) 226@@ -756,6 +756,11 @@ SunOS*)
225 ;; 227 ;;
226 esac 228 esac
227 229