aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
diff options
context:
space:
mode:
authorNitin A Kamble <nitin.a.kamble@intel.com>2011-10-14 07:06:13 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-10-31 22:03:20 +0000
commit01103b2f299fd9aa05ecae40760c2011f235f710 (patch)
tree43ebed3560003af61dccfefeb2d3da4932ad7167 /meta/recipes-devtools/python/python/01-use-proper-tools-for-cross-build.patch
parent0d18f03b225ffaffb1e17b40ff909f4948880647 (diff)
downloadopenembedded-core-contrib-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.patch80
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]
# built cross-tools (this will not work), so we introduce HOSTPYTHON and HOSTPGEN.
# Signed-Off: Michael 'Mickey' Lauer <mickey@vanille-media.de>
-Index: Python-2.6.6/Makefile.pre.in
+Index: Python-2.7.2/Makefile.pre.in
===================================================================
---- Python-2.6.6.orig/Makefile.pre.in
-+++ Python-2.6.6/Makefile.pre.in
-@@ -175,6 +175,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
+--- Python-2.7.2.orig/Makefile.pre.in
++++ Python-2.7.2/Makefile.pre.in
+@@ -182,6 +182,7 @@ UNICODE_OBJS= @UNICODE_OBJS@
PYTHON= python$(EXE)
BUILDPYTHON= python$(BUILDEXE)
@@ -16,7 +16,7 @@ Index: Python-2.6.6/Makefile.pre.in
# The task to run while instrument when building the profile-opt target
PROFILE_TASK= $(srcdir)/Tools/pybench/pybench.py -n 2 --with-gc --with-syscheck
-@@ -205,7 +206,7 @@ GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar
+@@ -214,7 +215,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@
##########################################################################
# Parser
PGEN= Parser/pgen$(EXE)
@@ -25,39 +25,48 @@ Index: Python-2.6.6/Makefile.pre.in
POBJS= \
Parser/acceler.o \
Parser/grammar1.o \
-@@ -394,8 +395,8 @@ platform: $(BUILDPYTHON)
+@@ -401,14 +402,14 @@ $(BUILDPYTHON): Modules/python.o $(LIBRA
+ $(BLDLIBRARY) $(LIBS) $(MODLIBS) $(SYSLIBS) $(LDLAST)
+
+ platform: $(BUILDPYTHON)
+- $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from sysconfig import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
++ $(RUNSHARED) ./$(BUILDPYTHON) -E -c 'import sys ; from distutils.util import get_platform ; print get_platform()+"-"+sys.version[0:3]' >platform
+
+
# Build the shared modules
sharedmods: $(BUILDPYTHON)
@case $$MAKEFLAGS in \
-- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
-- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
-+ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
-+ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' LDFLAGS='$(LDFLAGS)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
+- *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py -q build;; \
+- *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' ./$(BUILDPYTHON) -E $(srcdir)/setup.py build;; \
++ *s*) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py -q build;; \
++ *) $(RUNSHARED) CC='$(CC)' LDSHARED='$(BLDSHARED)' OPT='$(OPT)' $(HOSTPYTHON) -E $(srcdir)/setup.py build;; \
esac
# Build static library
-@@ -517,7 +518,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
-
- $(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT)
+@@ -542,7 +543,7 @@ Modules/python.o: $(srcdir)/Modules/pyth
+ $(GRAMMAR_H) $(GRAMMAR_C): Parser/pgen.stamp
+ Parser/pgen.stamp: $(PGEN) $(GRAMMAR_INPUT)
-@$(INSTALL) -d Include
-- -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
-+ -$(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
++ $(HOSTPGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C)
+ -touch Parser/pgen.stamp
$(PGEN): $(PGENOBJS)
- $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN)
-@@ -887,23 +888,23 @@ libinstall: build_all $(srcdir)/Lib/$(PL
+@@ -926,25 +927,25 @@ libinstall: build_all $(srcdir)/Lib/$(PL
done
$(INSTALL_DATA) $(srcdir)/LICENSE $(DESTDIR)$(LIBDEST)/LICENSE.txt
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(HOSTPYTHON) -Wi -tt $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(HOSTPYTHON) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \
-d $(LIBDEST) -f \
- -x 'bad_coding|badsyntax|site-packages' $(DESTDIR)$(LIBDEST)
+ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
+ $(DESTDIR)$(LIBDEST)
-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- ./$(BUILDPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
+ $(HOSTPYTHON) -Wi -t $(DESTDIR)$(LIBDEST)/compileall.py \
@@ -74,20 +83,20 @@ Index: Python-2.6.6/Makefile.pre.in
# Create the PLATDIR source directory, if one wasn't distributed..
$(srcdir)/Lib/$(PLATDIR):
-@@ -1001,7 +1002,7 @@ libainstall: all
+@@ -1049,7 +1050,7 @@ libainstall: all python-config
# Install the dynamically loadable modules
# This goes into $(exec_prefix)
- sharedinstall:
+ sharedinstall: sharedmods
- $(RUNSHARED) ./$(BUILDPYTHON) -E $(srcdir)/setup.py install \
+ $(RUNSHARED) $(HOSTPYTHON) -E $(srcdir)/setup.py install \
--prefix=$(prefix) \
--install-scripts=$(BINDIR) \
--install-platlib=$(DESTSHARED) \
-Index: Python-2.6.6/setup.py
+Index: Python-2.7.2/setup.py
===================================================================
---- Python-2.6.6.orig/setup.py
-+++ Python-2.6.6/setup.py
-@@ -322,6 +322,7 @@ class PyBuildExt(build_ext):
+--- Python-2.7.2.orig/setup.py
++++ Python-2.7.2/setup.py
+@@ -313,6 +313,7 @@ class PyBuildExt(build_ext):
self.failed.append(ext.name)
self.announce('*** WARNING: renaming "%s" since importing it'
' failed: %s' % (ext.name, why), level=3)
@@ -95,18 +104,18 @@ Index: Python-2.6.6/setup.py
assert not self.inplace
basename, tail = os.path.splitext(ext_filename)
newname = basename + "_failed" + tail
-@@ -356,8 +357,8 @@ class PyBuildExt(build_ext):
+@@ -369,8 +370,8 @@ class PyBuildExt(build_ext):
def detect_modules(self):
# Ensure that /usr/local is always used
- add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
- add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
-+ # add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
-+ # add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
++ #add_dir_to_list(self.compiler.library_dirs, '/usr/local/lib')
++ #add_dir_to_list(self.compiler.include_dirs, '/usr/local/include')
+ self.add_multiarch_paths()
# Add paths specified in the environment variables LDFLAGS and
- # CPPFLAGS for header and library files.
-@@ -456,6 +457,9 @@ class PyBuildExt(build_ext):
+@@ -475,6 +476,9 @@ class PyBuildExt(build_ext):
# XXX Omitted modules: gl, pure, dl, SGI-specific modules
@@ -116,3 +125,14 @@ Index: Python-2.6.6/setup.py
#
# The following modules are all pretty straightforward, and compile
# on pretty much any POSIXish platform.
+@@ -677,8 +681,8 @@ class PyBuildExt(build_ext):
+ elif curses_library:
+ readline_libs.append(curses_library)
+ elif self.compiler.find_library_file(lib_dirs +
+- ['/usr/lib/termcap'],
+- 'termcap'):
++ ['/usr/lib/termcap'],
++ 'termcap'):
+ readline_libs.append('termcap')
+ exts.append( Extension('readline', ['readline.c'],
+ library_dirs=['/usr/lib/termcap'],