summaryrefslogtreecommitdiff
path: root/PCbuild
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-09-17 15:39:18 -0700
committerGitHub <noreply@github.com>2018-09-17 15:39:18 -0700
commita8a8cc71c7fc7585e15652ff7ab354665f787d5a (patch)
tree06cddc83cb7e9ed203153864c037f7aed2aceb79 /PCbuild
parentb7f58d7f80f80f0e20cad84773f158a379a19280 (diff)
downloadcpython-git-a8a8cc71c7fc7585e15652ff7ab354665f787d5a.tar.gz
bpo-34267: Update find_python.bat to use 3.7 if available (GH-8552)
(cherry picked from commit 6750922f8d3428d84a016c34d6fcd99659e8610c) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/find_python.bat4
1 files changed, 2 insertions, 2 deletions
diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat
index 17ce7ac609..d0778ddd73 100644
--- a/PCbuild/find_python.bat
+++ b/PCbuild/find_python.bat
@@ -34,7 +34,7 @@
@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert sys.version_info[:2] >= (3, 6)" >nul 2>nul && (set PYTHON="%HOST_PYTHON%") && (set _Py_Python_Source=found as HOST_PYTHON) && goto :found
@rem If py.exe finds a recent enough version, use that one
-@py -3.6 -EV >nul 2>&1 && (set PYTHON=py -3.6) && (set _Py_Python_Source=found with py.exe) && goto :found
+@for %%p in (3.7 3.6) do @py -%%p -EV >nul 2>&1 && (set PYTHON=py -%%p) && (set _Py_Python_Source=found %%p with py.exe) && goto :found
@if NOT exist "%_Py_EXTERNALS_DIR%" mkdir "%_Py_EXTERNALS_DIR%"
@set _Py_NUGET=%NUGET%
@@ -55,7 +55,7 @@
)
@echo Installing Python via nuget...
@"%_Py_NUGET%" install pythonx86 -ExcludeVersion -OutputDirectory "%_Py_EXTERNALS_DIR%"
-@rem Quote it here; it's not quoted later because "py -3.6" wouldn't work
+@rem Quote it here; it's not quoted later because "py -x.y" wouldn't work
@if not errorlevel 1 (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found on nuget.org) & goto :found