diff options
author | Nitin A Kamble <nitin.a.kamble@intel.com> | 2011-10-14 07:06:13 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2011-10-31 22:03:20 +0000 |
commit | 01103b2f299fd9aa05ecae40760c2011f235f710 (patch) | |
tree | 43ebed3560003af61dccfefeb2d3da4932ad7167 /meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | |
parent | 0d18f03b225ffaffb1e17b40ff909f4948880647 (diff) | |
download | poky-01103b2f299fd9aa05ecae40760c2011f235f710.tar.gz |
python, python-native: upgrade from 2.6.6 to 2.7.2
Rebased these patches to the newer code
modified: python-native/nohostlibs.patch
modified: python/01-use-proper-tools-for-cross-build.patch
modified: python/06-avoid_usr_lib_termcap_path_in_linking.patch
modified: python/06-ctypes-libffi-fix-configure.patch
modified: python/multilib.patch
Deleted these patches are the are now upstream
deleted: python/02-remove-test-for-cross.patch
deleted: python/security_issue_2254_fix.patch
Added this patch to python-native
new file: python-native/multilib.patch
Updated site config file for python
modified: ../../site/common-linux : add ac_cv_have_long_long_format for python
avoid this error in python:
Include/pyport.h:243:13: error: #error "This platform's pyconfig.h needs to define PY_FORMAT_LONG_LONG"
Updated default python version
modified: ../../conf/distro/include/default-versions.inc
(From OE-Core rev: b284e9a512860b8a8380be80f96cebce6b92ff80)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch')
-rw-r--r-- | meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | 80 |
1 files changed, 50 insertions, 30 deletions
diff --git a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch index 6c769ac7d3..27afc030b2 100644 --- a/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch +++ b/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch | |||
@@ -4,11 +4,11 @@ Upstream-Status: Inappropriate [embedded specific] | |||
4 | # built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. | 4 | # built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. |
5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> | 5 | # Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> |
6 | 6 | ||
7 | Index: Python-2.6.6/Makefile.pre.in | 7 | Index: Python-2.7.2/Makefile.pre.in |
8 | =================================================================== | 8 | =================================================================== |
9 | --- Python-2.6.6.orig/Makefile.pre.in | 9 | --- Python-2.7.2.orig/Makefile.pre.in |
10 | +++ Python-2.6.6/Makefile.pre.in | 10 | +++ Python-2.7.2/Makefile.pre.in |
11 | @@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ | 11 | @@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ |
12 | 12 | ||
13 | PYTHON= python$(EXE) | 13 | PYTHON= python$(EXE) |
14 | BUILDPYTHON= python$(BUILDEXE) | 14 | BUILDPYTHON= python$(BUILDEXE) |
@@ -16,7 +16,7 @@ Index: Python-2.6.6/Makefile.pre.in | |||
16 | 16 | ||
17 | # The task to run while instrument when building the profile-opt target | 17 | # The task to run while instrument when building the profile-opt target |
18 | PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck | 18 | PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck |
19 | @@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar | 19 | @@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ |
20 | ########################################################################## | 20 | ########################################################################## |
21 | # Parser | 21 | # Parser |
22 | PGEN= Parser/pgen$(EXE) | 22 | PGEN= Parser/pgen$(EXE) |
@@ -25,39 +25,48 @@ Index: Python-2.6.6/Makefile.pre.in | |||
25 | POBJS= \ | 25 | POBJS= \ |
26 | Parser/acceler.o \ | 26 | Parser/acceler.o \ |
27 | Parser/grammar1.o \ | 27 | Parser/grammar1.o \ |
28 | @@ -394,8 +395,8 @@ platform: $(BUILDPYTHON) | 28 | @@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA |
29 | $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST) | ||
30 | |||
31 | platform: $(BUILDPYTHON) | ||
32 | - $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform | ||
33 | + $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform | ||
34 | |||
35 | |||
29 | # Build the shared modules | 36 | # Build the shared modules |
30 | sharedmods: $(BUILDPYTHON) | 37 | sharedmods: $(BUILDPYTHON) |
31 | @case $$MAKEFLAGS in \ | 38 | @case $$MAKEFLAGS in \ |
32 | - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ | 39 | - *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \ |
33 | - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ | 40 | - *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \ |
34 | + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ | 41 | + *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \ |
35 | + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ | 42 | + *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \ |
36 | esac | 43 | esac |
37 | 44 | ||
38 | # Build static library | 45 | # Build static library |
39 | @@ -517,7 +518,7 @@ Modules/python.o: $(srcdir)/Modules/pyth | 46 | @@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth |
40 | 47 | $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp | |
41 | $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) | 48 | Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) |
42 | -@$(INSTALL) -d Include | 49 | -@$(INSTALL) -d Include |
43 | - -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 50 | - $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
44 | + -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) | 51 | + $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) |
52 | -touch Parser/pgen.stamp | ||
45 | 53 | ||
46 | $(PGEN): $(PGENOBJS) | 54 | $(PGEN): $(PGENOBJS) |
47 | $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) | 55 | @@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL |
48 | @@ -887,23 +888,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL | ||
49 | done | 56 | done |
50 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt | 57 | $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt |
51 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 58 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
52 | - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 59 | - ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
53 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ | 60 | + $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ |
54 | -d $(LIBDEST) -f \ | 61 | -d $(LIBDEST) -f \ |
55 | -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | 62 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
63 | $(DESTDIR)$(LIBDEST) | ||
56 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 64 | PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
57 | - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 65 | - ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
58 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ | 66 | + $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ |
59 | -d $(LIBDEST) -f \ | 67 | -d $(LIBDEST) -f \ |
60 | -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST) | 68 | -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ |
69 | $(DESTDIR)$(LIBDEST) | ||
61 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ | 70 | -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ |
62 | - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | 71 | - ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
63 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ | 72 | + $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ |
@@ -74,20 +83,20 @@ Index: Python-2.6.6/Makefile.pre.in | |||
74 | 83 | ||
75 | # Create the PLATDIR source directory, if one wasn't distributed.. | 84 | # Create the PLATDIR source directory, if one wasn't distributed.. |
76 | $(srcdir)/Lib/$(PLATDIR): | 85 | $(srcdir)/Lib/$(PLATDIR): |
77 | @@ -1001,7 +1002,7 @@ libainstall: all | 86 | @@ -1049,7 +1050,7 @@ libainstall: all python-config |
78 | # Install the dynamically loadable modules | 87 | # Install the dynamically loadable modules |
79 | # This goes into $(exec_prefix) | 88 | # This goes into $(exec_prefix) |
80 | sharedinstall: | 89 | sharedinstall: sharedmods |
81 | - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ | 90 | - $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \ |
82 | + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ | 91 | + $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \ |
83 | --prefix=$(prefix) \ | 92 | --prefix=$(prefix) \ |
84 | --install-scripts=$(BINDIR) \ | 93 | --install-scripts=$(BINDIR) \ |
85 | --install-platlib=$(DESTSHARED) \ | 94 | --install-platlib=$(DESTSHARED) \ |
86 | Index: Python-2.6.6/setup.py | 95 | Index: Python-2.7.2/setup.py |
87 | =================================================================== | 96 | =================================================================== |
88 | --- Python-2.6.6.orig/setup.py | 97 | --- Python-2.7.2.orig/setup.py |
89 | +++ Python-2.6.6/setup.py | 98 | +++ Python-2.7.2/setup.py |
90 | @@ -322,6 +322,7 @@ class PyBuildExt(build_ext): | 99 | @@ -313,6 +313,7 @@ class PyBuildExt(build_ext): |
91 | self.failed.append(ext.name) | 100 | self.failed.append(ext.name) |
92 | self.announce('*** WARNING: renaming "%s" since importing it' | 101 | self.announce('*** WARNING: renaming "%s" since importing it' |
93 | ' failed: %s' % (ext.name, why), level=3) | 102 | ' failed: %s' % (ext.name, why), level=3) |
@@ -95,18 +104,18 @@ Index: Python-2.6.6/setup.py | |||
95 | assert not self.inplace | 104 | assert not self.inplace |
96 | basename, tail = os.path.splitext(ext_filename) | 105 | basename, tail = os.path.splitext(ext_filename) |
97 | newname = basename + "_failed" + tail | 106 | newname = basename + "_failed" + tail |
98 | @@ -356,8 +357,8 @@ class PyBuildExt(build_ext): | 107 | @@ -369,8 +370,8 @@ class PyBuildExt(build_ext): |
99 | 108 | ||
100 | def detect_modules(self): | 109 | def detect_modules(self): |
101 | # Ensure that /usr/local is always used | 110 | # Ensure that /usr/local is always used |
102 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | 111 | - add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
103 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 112 | - add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
104 | + # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') | 113 | + #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib') |
105 | + # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') | 114 | + #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include') |
115 | self.add_multiarch_paths() | ||
106 | 116 | ||
107 | # Add paths specified in the environment variables LDFLAGS and | 117 | # Add paths specified in the environment variables LDFLAGS and |
108 | # CPPFLAGS for header and library files. | 118 | @@ -475,6 +476,9 @@ class PyBuildExt(build_ext): |
109 | @@ -456,6 +457,9 @@ class PyBuildExt(build_ext): | ||
110 | 119 | ||
111 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules | 120 | # XXX Omitted modules: gl, pure, dl, SGI-specific modules |
112 | 121 | ||
@@ -116,3 +125,14 @@ Index: Python-2.6.6/setup.py | |||
116 | # | 125 | # |
117 | # The following modules are all pretty straightforward, and compile | 126 | # The following modules are all pretty straightforward, and compile |
118 | # on pretty much any POSIXish platform. | 127 | # on pretty much any POSIXish platform. |
128 | @@ -677,8 +681,8 @@ class PyBuildExt(build_ext): | ||
129 | elif curses_library: | ||
130 | readline_libs.append(curses_library) | ||
131 | elif self.compiler.find_library_file(lib_dirs + | ||
132 | - ['/usr/lib/termcap'], | ||
133 | - 'termcap'): | ||
134 | + ['/usr/lib/termcap'], | ||
135 | + 'termcap'): | ||
136 | readline_libs.append('termcap') | ||
137 | exts.append( Extension('readline', ['readline.c'], | ||
138 | library_dirs=['/usr/lib/termcap'], | ||