From 9acef2c6798750a67eadd0350e9e7fe4161689d0 Mon Sep 17 00:00:00 2001 From: wsnipex Date: Wed, 29 Jun 2016 10:27:07 +0200 Subject: [PATCH] [depends] bump python to 2.7.12 --- tools/depends/native/python27-native/Makefile | 2 +- tools/depends/target/python27/Makefile | 6 +- ...patch => Python-2.7.12-crosscompile.patch} | 78 +++++++++---------- .../python27/Python-no-export-path.patch | 2 +- .../target/python27/Python-setup.patch | 4 +- tools/depends/target/python27/fix-ffi.patch | 10 +-- 6 files changed, 49 insertions(+), 53 deletions(-) rename tools/depends/target/python27/{Python-2.7.10-crosscompile.patch => Python-2.7.12-crosscompile.patch} (82%) diff --git a/tools/depends/native/python27-native/Makefile b/tools/depends/native/python27-native/Makefile index cfa705e42aaf9..ed3e76a217d39 100644 --- a/tools/depends/native/python27-native/Makefile +++ b/tools/depends/native/python27-native/Makefile @@ -4,7 +4,7 @@ DEPS= ../../Makefile.include.in Makefile # lib name, version LIBNAME=Python -VERSION=2.7.11 +VERSION=2.7.12 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.xz CWD=$(shell pwd) diff --git a/tools/depends/target/python27/Makefile b/tools/depends/target/python27/Makefile index d6a68bdd87014..720811e77be6f 100644 --- a/tools/depends/target/python27/Makefile +++ b/tools/depends/target/python27/Makefile @@ -1,10 +1,10 @@ include ../../Makefile.include -DEPS= ../../Makefile.include Makefile Python-2.7.10-crosscompile.patch Python-2.7.10-android.patch Python-no-export-path.patch \ +DEPS= ../../Makefile.include Makefile Python-2.7.12-crosscompile.patch Python-2.7.10-android.patch Python-no-export-path.patch \ Python-setup.patch fix-datetime.patch Python-2.6.5-urllib.diff modules.setup make-fork-optional.patch # lib name, version LIBNAME=Python -VERSION=2.7.11 +VERSION=2.7.12 SOURCE=$(LIBNAME)-$(VERSION) ARCHIVE=$(SOURCE).tar.xz @@ -33,7 +33,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS) echo $(NATIVEPREFIX) rm -rf $(PLATFORM)/*; mkdir -p $(PLATFORM) cd $(PLATFORM); $(ARCHIVE_TOOL) $(ARCHIVE_TOOL_FLAGS) $(TARBALLS_LOCATION)/$(ARCHIVE) - cd $(PLATFORM); patch -p0 < ../Python-2.7.10-crosscompile.patch + cd $(PLATFORM); patch -p1 < ../Python-2.7.12-crosscompile.patch cd $(PLATFORM); patch -p0 < ../Python-setup.patch cd $(PLATFORM); patch -p0 < ../fix-datetime.patch cd $(PLATFORM); patch -p0 < ../Python-2.7.10-android.patch diff --git a/tools/depends/target/python27/Python-2.7.10-crosscompile.patch b/tools/depends/target/python27/Python-2.7.12-crosscompile.patch similarity index 82% rename from tools/depends/target/python27/Python-2.7.10-crosscompile.patch rename to tools/depends/target/python27/Python-2.7.12-crosscompile.patch index c7c1c42949798..b30e97240d5df 100644 --- a/tools/depends/target/python27/Python-2.7.10-crosscompile.patch +++ b/tools/depends/target/python27/Python-2.7.12-crosscompile.patch @@ -1,6 +1,7 @@ ---- Makefile.pre.in.orig 2015-05-23 18:09:16.000000000 +0200 -+++ Makefile.pre.in 2015-10-10 12:29:21.988926069 +0200 -@@ -238,6 +238,7 @@ +index dffc0b9..efc79ab 100644 +--- a/Makefile.pre.in ++++ b/Makefile.pre.in +@@ -246,6 +246,7 @@ LIBFFI_INCLUDEDIR= @LIBFFI_INCLUDEDIR@ ########################################################################## # Parser PGEN= Parser/pgen$(EXE) @@ -8,7 +9,7 @@ PSRCS= \ Parser/acceler.c \ -@@ -497,9 +498,9 @@ +@@ -544,9 +545,9 @@ sharedmods: $(BUILDPYTHON) pybuilddir.txt Modules/_math.o *\ -s*|s*) quiet="-q";; \ *) quiet="";; \ esac; \ @@ -20,16 +21,7 @@ # Build static library # avoid long command lines, same as LIBRARY_OBJS -@@ -636,7 +637,7 @@ - $(GRAMMAR_H): $(GRAMMAR_INPUT) $(PGENSRCS) - @$(MKDIR_P) Include - $(MAKE) $(PGEN) -- $(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) -+ $(PGEN_FOR_BUILD) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) - $(GRAMMAR_C): $(GRAMMAR_H) $(GRAMMAR_INPUT) $(PGENSRCS) - $(MAKE) $(GRAMMAR_H) - touch $(GRAMMAR_C) -@@ -1072,12 +1073,12 @@ +@@ -1132,12 +1133,12 @@ libinstall: build_all $(srcdir)/Lib/$(PLATDIR) $(srcdir)/Modules/xxmodule.c $(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \ $(DESTDIR)$(LIBDEST)/distutils/tests ; \ fi @@ -44,7 +36,7 @@ $(PYTHON_FOR_BUILD) -Wi -tt -O $(DESTDIR)$(LIBDEST)/compileall.py \ -d $(LIBDEST) -f \ -x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \ -@@ -1205,11 +1206,13 @@ +@@ -1265,11 +1266,13 @@ libainstall: all python-config # Install the dynamically loadable modules # This goes into $(exec_prefix) sharedinstall: sharedmods @@ -61,9 +53,31 @@ -rm $(DESTDIR)$(DESTSHARED)/_sysconfigdata.py* # Here are a couple of targets for MacOSX again, to install a full ---- setup.py.orig 2015-05-23 18:09:25.000000000 +0200 -+++ setup.py 2015-10-10 12:29:22.000925764 +0200 -@@ -17,7 +17,7 @@ +diff --git a/configure.ac b/configure.ac +index 06c877b..de26012 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -326,7 +326,6 @@ then + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +- AC_MSG_ERROR([cross build not supported for $host]) + esac + ac_sys_release= + else +@@ -372,7 +371,6 @@ if test "$cross_compiling" = yes; then + *) + # for now, limit cross builds to known configurations + MACHDEP="unknown" +- AC_MSG_ERROR([cross build not supported for $host]) + esac + _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" + fi +diff --git a/setup.py b/Python-2.7.12/setup.py +index aa08ada..f21e349 100644 +--- a/setup.py ++++ b/setup.py +@@ -17,7 +17,7 @@ from distutils.command.install import install from distutils.command.install_lib import install_lib from distutils.spawn import find_executable @@ -72,7 +86,7 @@ def get_platform(): # cross build -@@ -162,6 +162,7 @@ +@@ -178,6 +178,7 @@ class PyBuildExt(build_ext): def build_extensions(self): @@ -80,7 +94,7 @@ # Detect which modules should be compiled missing = self.detect_modules() -@@ -326,6 +327,9 @@ +@@ -342,6 +343,9 @@ class PyBuildExt(build_ext): # Don't try to load extensions for cross builds if cross_compiling: @@ -90,7 +104,7 @@ return try: -@@ -480,7 +484,7 @@ +@@ -496,7 +500,7 @@ class PyBuildExt(build_ext): for directory in reversed(options.dirs): add_dir_to_list(dir_list, directory) @@ -99,7 +113,7 @@ and not sysconfig.get_config_var('PYTHONFRAMEWORK'): # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework # (PYTHONFRAMEWORK is set) to avoid # linking problems when -@@ -556,6 +560,11 @@ +@@ -572,6 +576,11 @@ class PyBuildExt(build_ext): if host_platform in ['darwin', 'beos']: math_libs = [] @@ -111,7 +125,7 @@ # XXX Omitted modules: gl, pure, dl, SGI-specific modules # -@@ -2028,8 +2037,13 @@ +@@ -2048,8 +2057,13 @@ class PyBuildExt(build_ext): # Pass empty CFLAGS because we'll just append the resulting # CFLAGS to Python's; -g or -O2 is to be avoided. @@ -127,21 +141,3 @@ res = os.system(cmd) if res or not os.path.exists(ffi_configfile): ---- configure.ac.orig 2015-10-10 13:10:34.139980182 +0200 -+++ configure.ac 2015-10-10 13:11:00.715341145 +0200 -@@ -325,7 +325,6 @@ - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -- AC_MSG_ERROR([cross build not supported for $host]) - esac - ac_sys_release= - else -@@ -371,7 +370,6 @@ - *) - # for now, limit cross builds to known configurations - MACHDEP="unknown" -- AC_MSG_ERROR([cross build not supported for $host]) - esac - _PYTHON_HOST_PLATFORM="$MACHDEP${_host_cpu:+-$_host_cpu}" - fi diff --git a/tools/depends/target/python27/Python-no-export-path.patch b/tools/depends/target/python27/Python-no-export-path.patch index 6c486ccc4a3be..ec7278bb15709 100644 --- a/tools/depends/target/python27/Python-no-export-path.patch +++ b/tools/depends/target/python27/Python-no-export-path.patch @@ -1,6 +1,6 @@ --- Makefile.pre.in.orig 2015-10-09 19:10:15.042905069 +0200 +++ Makefile.pre.in 2015-10-09 19:11:01.513642241 +0200 -@@ -1100,8 +1100,6 @@ +@@ -1160,8 +1160,6 @@ $(srcdir)/Lib/$(PLATDIR): mkdir $(srcdir)/Lib/$(PLATDIR) cp $(srcdir)/Lib/plat-generic/regen $(srcdir)/Lib/$(PLATDIR)/regen diff --git a/tools/depends/target/python27/Python-setup.patch b/tools/depends/target/python27/Python-setup.patch index e9ff0c2de5e00..da1a59052fafd 100644 --- a/tools/depends/target/python27/Python-setup.patch +++ b/tools/depends/target/python27/Python-setup.patch @@ -1,6 +1,6 @@ --- setup.py.orig 2015-10-07 16:32:16.219083585 +0200 +++ setup.py 2015-10-07 16:41:48.563085871 +0200 -@@ -321,6 +321,9 @@ +@@ -337,6 +337,9 @@ self.announce('WARNING: skipping import check for Cygwin-based "%s"' % ext.name) return @@ -10,7 +10,7 @@ ext_filename = os.path.join( self.build_lib, self.get_ext_filename(self.get_ext_fullname(ext.name))) -@@ -335,27 +338,30 @@ +@@ -351,27 +354,30 @@ try: imp.load_dynamic(ext.name, ext_filename) except ImportError, why: diff --git a/tools/depends/target/python27/fix-ffi.patch b/tools/depends/target/python27/fix-ffi.patch index 270ac0a62b30f..e1c3bf25c7500 100644 --- a/tools/depends/target/python27/fix-ffi.patch +++ b/tools/depends/target/python27/fix-ffi.patch @@ -1,6 +1,6 @@ --- Modules/_ctypes/malloc_closure.c.orig 2015-10-11 20:37:30.534378131 +0200 +++ Modules/_ctypes/malloc_closure.c 2015-10-11 20:38:57.322381368 +0200 -@@ -93,6 +93,7 @@ +@@ -89,6 +89,7 @@ /******************************************************************/ /* put the item back into the free list */ @@ -8,7 +8,7 @@ void ffi_closure_free(void *p) { ITEM *item = (ITEM *)p; -@@ -100,7 +101,6 @@ +@@ -96,7 +97,6 @@ free_list = item; } @@ -16,14 +16,14 @@ void *ffi_closure_alloc(size_t ignored, void** codeloc) { ITEM *item; -@@ -113,3 +113,4 @@ +@@ -109,3 +109,4 @@ *codeloc = (void *)item; return (void *)item; } +*/ --- Modules/_ctypes/cfield.c.orig 2015-10-11 20:34:03.034370393 +0200 +++ Modules/_ctypes/cfield.c 2015-10-11 20:37:04.462377159 +0200 -@@ -1724,6 +1724,7 @@ +@@ -1725,6 +1725,7 @@ */ /* align and size are bogus for void, but they must not be zero */ @@ -31,7 +31,7 @@ ffi_type ffi_type_void = { 1, 1, FFI_TYPE_VOID }; ffi_type ffi_type_uint8 = { 1, 1, FFI_TYPE_UINT8 }; -@@ -1740,14 +1741,14 @@ +@@ -1741,14 +1742,14 @@ ffi_type ffi_type_float = { sizeof(float), FLOAT_ALIGN, FFI_TYPE_FLOAT }; ffi_type ffi_type_double = { sizeof(double), DOUBLE_ALIGN, FFI_TYPE_DOUBLE };