summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
diff options
context:
space:
mode:
authorAlejandro Hernandez <alejandro.hernandez@linux.intel.com>2015-02-11 17:57:49 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-23 17:35:29 +0000
commitcb02ecb507ddad3cb17c78020b42c004aa2903ae (patch)
tree0f30353b3c8a3aaf6294f8db9c8fb7cff5575ab9 /meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
parent122ee11bd1817f776336e54898cb36162fe527df (diff)
downloadpoky-cb02ecb507ddad3cb17c78020b42c004aa2903ae.tar.gz
Python: Upgrade from 2.7.3 to 2.7.9:
- Based on Paul Eggletons work to partially upgrade to Python 2.7.6 Modified: default-versions.inc: switched to python 2.7.9 generate-manifest-2.7.py: fixed _sysconfigdata python-2.7-manifest.inc: fixed _sysconfigdata python.inc: Updated checksums and source, no LICENSE change just updated some dates python-native_2.7.3 -> python-native_2.7.9 and updated patches python_2.7.3 -> python_2.7.9, and added ac_cv_file__dev_ptmx=no ac_cv_file__dev_ptc=no in EXTRA_OECONF to solve python issue #3754, only needed when cross compiling, also updated patches use_sysroot_ncurses_instead_of_host.patch: New patch to use ncursesw from sysroot instead of hosts, introduced by fix for python issue #15268 Rebased: 01-use-proper-tools-for-cross-build.patch 03-fix-tkinter-detection.patch 05-enable-ctypes-cross-build.patch 06-avoid_usr_lib_termcap_path_in_linking.patch avoid_warning_about_tkinter.patch builddir.patch fix_for_using_different_libdir.patch host_include_contamination.patch multilib.patch nohostlibs.patch search_db_h_in_inc_dirs_and_avoid_warning.patch Deleted (fixed on upstream): 06-ctypes-libffi-fix-configure.patch CVE-2013-4073_py27.patch gcc-4.8-fix-configure-Wformat.patch json-flaw-fix.patch posix_close.patch pypirc-secure.patch python-2.7.3-CVE-2012-2135.patch python-2.7.3-CVE-2013-1752-smtplib-fix.patch python-2.7.3-CVE-2014-1912.patch python-2.7.3-CVE-2014-7185.patch python-2.7.3-berkeley-db-5.3.patch python-fix-build-error-with-Readline-6.3.patch remove-BOM-insection-code.patch remove_sqlite_rpath.patch python2.7.3-nossl3.patch [YOCTO #7059] (From OE-Core rev: d4ad95f0d5f08891637c644e85b09da9c4585059) Signed-off-by: Alejandro Hernandez <alejandro.hernandez@linux.intel.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.patch137
1 files changed, 48 insertions, 89 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 691beada03..1257ca6557 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
@@ -1,102 +1,83 @@
1We need to ensure our host tools get run during build, not the freshly
2built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
3
1Upstream-Status: Inappropriate [embedded specific] 4Upstream-Status: Inappropriate [embedded specific]
2 5
3# We need to ensure our host tools get run during build, not the freshly 6Signed-off-by: Michael 'Mickey' Lauer <mickey@vanille-media.de>
4# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN. 7Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
5# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de> 8
9Rebased for python-2.7.9
10Signed-Off-By: Alejandro Hernandez <alejandro.hernandez@linux.intel.com>
6 11
7Index: Python-2.7.2/Makefile.pre.in 12Index: Python-2.7.9/Makefile.pre.in
8=================================================================== 13===================================================================
9--- Python-2.7.2.orig/Makefile.pre.in 14--- Python-2.7.9.orig/Makefile.pre.in
10+++ Python-2.7.2/Makefile.pre.in 15+++ Python-2.7.9/Makefile.pre.in
11@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@ 16@@ -234,6 +234,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
12
13 PYTHON= python$(EXE)
14 BUILDPYTHON= python$(BUILDEXE)
15+HOSTPYTHON= $(BUILDPYTHON)
16
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
19@@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
20 ########################################################################## 17 ##########################################################################
21 # Parser 18 # Parser
22 PGEN= Parser/pgen$(EXE) 19 PGEN= Parser/pgen$(EXE)
23-
24+HOSTPGEN= $(PGEN)$(EXE) 20+HOSTPGEN= $(PGEN)$(EXE)
25 POBJS= \
26 Parser/acceler.o \
27 Parser/grammar1.o \
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 21
22 PSRCS= \
23 Parser/acceler.c \
24@@ -445,7 +446,7 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
25 $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
35 26
36 # Build the shared modules 27 platform: $(BUILDPYTHON) pybuilddir.txt
37 sharedmods: $(BUILDPYTHON) 28- $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
38 @case $$MAKEFLAGS in \ 29+ $(RUNSHARED) $(PYTHON_FOR_BUILD) -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
39- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
40- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
41+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
42+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
43 esac
44 30
45 # Build static library 31 # Create build directory and generate the sysconfig build-time data there.
46@@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth 32 # pybuilddir.txt contains the name of the build dir and is used for
47 $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp 33@@ -611,7 +612,7 @@ Modules/pwdmodule.o: $(srcdir)/Modules/p
48 Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT) 34 $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS)
49 -@$(INSTALL) -d Include 35 @$(MKDIR_P) Include
36 $(MAKE) $(PGEN)
50- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) 37- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
51+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) 38+ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
52 -touch Parser/pgen.stamp 39 $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS)
53 40 $(MAKE) $(GRAMMAR_H)
54 $(PGEN): $(PGENOBJS) 41 touch $(GRAMMAR_C)
55@@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL 42@@ -1043,27 +1044,27 @@ libinstall: build_all $(srcdir)/Lib/$(PL
56 done 43 $(DESTDIR)$(LIBDEST)/distutils/tests ; \
57 $(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt 44 fi
58 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ 45 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
59- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ 46- $(PYTHON_FOR_BUILD) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
60+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \ 47+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
61 -d $(LIBDEST) -f \ 48 -d $(LIBDEST) -f \
62 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ 49 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
63 $(DESTDIR)$(LIBDEST) 50 $(DESTDIR)$(LIBDEST)
64 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ 51 PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
65- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ 52- $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
66+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ 53+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
67 -d $(LIBDEST) -f \ 54 -d $(LIBDEST) -f \
68 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ 55 -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
69 $(DESTDIR)$(LIBDEST) 56 $(DESTDIR)$(LIBDEST)
70 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ 57 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
71- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ 58- $(PYTHON_FOR_BUILD) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
72+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \ 59+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
73 -d $(LIBDEST)/site-packages -f \ 60 -d $(LIBDEST)/site-packages -f \
74 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages 61 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
75 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ 62 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
76- ./$(BUILDPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ 63- $(PYTHON_FOR_BUILD) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \
77+ $(HOSTPYTHON) -Wi -t -O $(DESTDIR)$(LIBDEST)/compileall.py \ 64+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
78 -d $(LIBDEST)/site-packages -f \ 65 -d $(LIBDEST)/site-packages -f \
79 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages 66 -x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
80 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \ 67 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
81- ./$(BUILDPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" 68- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
82+ $(HOSTPYTHON) -Wi -t -c "import lib2to3.pygram, lib2to3.patcomp;lib2to3.patcomp.PatternCompiler()" 69+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
70 -PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
71- $(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
72+ $(HOSTPYTHON) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/PatternGrammar.txt
83 73
84 # Create the PLATDIR source directory, if one wasn't distributed.. 74 # Create the PLATDIR source directory, if one wasn't distributed..
85 $(srcdir)/Lib/$(PLATDIR): 75 $(srcdir)/Lib/$(PLATDIR):
86@@ -1049,7 +1050,7 @@ libainstall: all python-config 76Index: Python-2.7.9/setup.py
87 # Install the dynamically loadable modules
88 # This goes into $(exec_prefix)
89 sharedinstall: sharedmods
90- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
91+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
92 --prefix=$(prefix) \
93 --install-scripts=$(BINDIR) \
94 --install-platlib=$(DESTSHARED) \
95Index: Python-2.7.2/setup.py
96=================================================================== 77===================================================================
97--- Python-2.7.2.orig/setup.py 78--- Python-2.7.9.orig/setup.py
98+++ Python-2.7.2/setup.py 79+++ Python-2.7.9/setup.py
99@@ -313,6 +313,7 @@ class PyBuildExt(build_ext): 80@@ -334,6 +334,7 @@ class PyBuildExt(build_ext):
100 self.failed.append(ext.name) 81 self.failed.append(ext.name)
101 self.announce('*** WARNING: renaming "%s" since importing it' 82 self.announce('*** WARNING: renaming "%s" since importing it'
102 ' failed: %s' % (ext.name, why), level=3) 83 ' failed: %s' % (ext.name, why), level=3)
@@ -104,18 +85,7 @@ Index: Python-2.7.2/setup.py
104 assert not self.inplace 85 assert not self.inplace
105 basename, tail = os.path.splitext(ext_filename) 86 basename, tail = os.path.splitext(ext_filename)
106 newname = basename + "_failed" + tail 87 newname = basename + "_failed" + tail
107@@ -369,8 +370,8 @@ class PyBuildExt(build_ext): 88@@ -558,6 +559,9 @@ class PyBuildExt(build_ext):
108
109 def detect_modules(self):
110 # Ensure that /usr/local is always used
111- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
112- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
113+ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
114+ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
115 self.add_multiarch_paths()
116
117 # Add paths specified in the environment variables LDFLAGS and
118@@ -475,6 +476,9 @@ class PyBuildExt(build_ext):
119 89
120 # XXX Omitted modules: gl, pure, dl, SGI-specific modules 90 # XXX Omitted modules: gl, pure, dl, SGI-specific modules
121 91
@@ -125,14 +95,3 @@ Index: Python-2.7.2/setup.py
125 # 95 #
126 # The following modules are all pretty straightforward, and compile 96 # The following modules are all pretty straightforward, and compile
127 # on pretty much any POSIXish platform. 97 # 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'],