Commit 9badea2d authored by Thomas Petazzoni's avatar Thomas Petazzoni
Browse files

python: bump to 2.7.9



In addition to doing the bump, this commit also:

 - Refreshes all the patches
 - Removes python-003-properly-detect-if-python-build.patch, which has
   been applied upstream.
 - Passes the --without-ensurepip option, like is done in Python 3, to
   avoid having Python use PIP to automatically download stuff when it
   is being built.
 - PYTHON_LIBTOOL_PATH = NO is added to prevent Buildroot from trying
   to patch a version of libtool for which we don't have matching
   patches, which isn't a problem since we're anyway not using the
   part of the Python sources that uses libtool (it's the built-in
   copy of libffi, and we use the external libffi).

Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tested-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: default avatar"Yann E. MORIN" <yann.morin.1998@free.fr>
parent c24c8748
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ Index: b/setup.py
===================================================================
--- a/setup.py
+++ b/setup.py
@@ -478,7 +478,7 @@
@@ -480,7 +480,7 @@
                     for directory in reversed(options.dirs):
                         add_dir_to_list(dir_list, directory)
 
+0 −23
Original line number Diff line number Diff line
distutils: fix build_ext check to find whether we're building Python or not

The build_ext logic uses
sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) to
determine whether we're building a third-party Python extension, or a
built-in Python extension. However, this check is wrong in
cross-compilation mode, and instead, the sysconfig.python_build
variable should be used.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Index: b/Lib/distutils/command/build_ext.py
===================================================================
--- a/Lib/distutils/command/build_ext.py
+++ b/Lib/distutils/command/build_ext.py
@@ -235,7 +235,7 @@
         # Python's library directory must be appended to library_dirs
         # See Issues: #1600860, #4366
         if (sysconfig.get_config_var('Py_ENABLE_SHARED')):
-            if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")):
+            if not sysconfig.python_build:
                 # building third party extensions
                 self.library_dirs.append(sysconfig.get_config_var('LIBDIR'))
             else:
+11 −11
Original line number Diff line number Diff line
@@ -21,17 +21,17 @@ Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -449,6 +449,9 @@
 # sys.path fixup -- see Modules/getpath.c.
 pybuilddir.txt: $(BUILDPYTHON)
 		$(RUNSHARED) $(PYTHON_FOR_BUILD) -S -m sysconfig --generate-posix-vars
@@ -462,6 +462,9 @@
 		rm -f ./pybuilddir.txt ; \
 		exit 1 ; \
 	fi
+	echo `cat pybuilddir.txt`/sysconfigdata > pysysconfigdatadir.txt
+	mkdir -p `cat pysysconfigdatadir.txt`
+	cp `cat pybuilddir.txt`/_sysconfigdata.py `cat pysysconfigdatadir.txt`
 
 # Build the shared modules
 # Under GNU make, MAKEFLAGS are sorted and normalized; the 's' for
@@ -969,7 +972,7 @@
@@ -1002,7 +1005,7 @@
 		else	true; \
 		fi; \
 	done
@@ -40,7 +40,7 @@ Index: b/Makefile.pre.in
 	do \
 		if test -x $$i; then \
 			$(INSTALL_SCRIPT) $$i $(DESTDIR)$(LIBDEST); \
@@ -979,6 +982,11 @@
@@ -1012,6 +1015,11 @@
 			echo $(INSTALL_DATA) $$i $(LIBDEST); \
 		fi; \
 	done
@@ -52,7 +52,7 @@ Index: b/Makefile.pre.in
 	@for d in $(LIBSUBDIRS); \
 	do \
 		a=$(srcdir)/Lib/$$d; \
@@ -1304,7 +1312,7 @@
@@ -1337,7 +1345,7 @@
 		Modules/Setup Modules/Setup.local Modules/Setup.config \
 		Modules/ld_so_aix Modules/python.exp Misc/python.pc
 	-rm -f python*-gdb.py
@@ -65,7 +65,7 @@ Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@
@@ -33,7 +33,7 @@
 	    AC_MSG_ERROR([python$PACKAGE_VERSION interpreter not found])
 	fi
         AC_MSG_RESULT($interp)
+2 −2
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Index: b/Makefile.pre.in
===================================================================
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -1017,24 +1017,32 @@
@@ -1050,24 +1050,32 @@
 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
 	fi
@@ -39,7 +39,7 @@ Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -733,6 +733,17 @@
@@ -736,6 +736,17 @@
     ;;
 esac
 
+1 −1
Original line number Diff line number Diff line
@@ -2,7 +2,7 @@ Index: b/configure.ac
===================================================================
--- a/configure.ac
+++ b/configure.ac
@@ -3343,7 +3343,7 @@
@@ -3346,7 +3346,7 @@
 
 AC_MSG_RESULT($ac_cv_buggy_getaddrinfo)
 
Loading