]> granicus.if.org Git - python/commitdiff
Issue #27434: Version of interpreter running a cross-build and source version must...
authorXavier de Gaye <xdegaye@users.sourceforge.net>
Thu, 7 Jul 2016 16:00:22 +0000 (18:00 +0200)
committerXavier de Gaye <xdegaye@users.sourceforge.net>
Thu, 7 Jul 2016 16:00:22 +0000 (18:00 +0200)
Misc/NEWS
configure
configure.ac

index 142848bd9b10de45aaac936251b5a579203b00ac..263ba1d77221c8bb70dbc95d2181b95c7931df34 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -132,6 +132,9 @@ C API
 Build
 -----
 
+- Issue #27434: The interpreter that runs the cross-build, found in PATH, must
+  now be of the same feature version (e.g. 3.6) as the source being built.
+
 - Issue #26930: Update Windows builds to use OpenSSL 1.0.2h.
 
 - Issue #23968: Rename the platform directory from plat-$(MACHDEP) to
index f6a489259a1d3c8b98b469e40c72e8b0c7b3e66d..fbde7f6f5564fb730fc602fe8f46e3500c6b4774 100755 (executable)
--- a/configure
+++ b/configure
@@ -3002,7 +3002,7 @@ $as_echo_n "checking for python interpreter for cross build... " >&6; }
     if test -z "$PYTHON_FOR_BUILD"; then
         for interp in python$PACKAGE_VERSION python3 python; do
            which $interp >/dev/null 2>&1 || continue
-           if $interp -c 'import sys;sys.exit(not sys.version_info[:2] >= (3,3))'; then
+           if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info[:2]) == '$PACKAGE_VERSION')"; then
                break
            fi
             interp=
index 60e8089d678f3e1b6d29697c43389ec92832cf71..9b65ec16a4eb88f351d41f21358fd25e2bf2ae56 100644 (file)
@@ -62,7 +62,7 @@ if test "$cross_compiling" = yes; then
     if test -z "$PYTHON_FOR_BUILD"; then
         for interp in python$PACKAGE_VERSION python3 python; do
            which $interp >/dev/null 2>&1 || continue
-           if $interp -c 'import sys;sys.exit(not sys.version_info@<:@:2@:>@ >= (3,3))'; then
+           if $interp -c "import sys;sys.exit(not '.'.join(str(n) for n in sys.version_info@<:@:2@:>@) == '$PACKAGE_VERSION')"; then
                break
            fi
             interp=