[Python-checkins] bpo-40432: Use python 3.8 or higher to compile CPython on Windows (#25389)

zooba webhook-mailer at python.org
Mon Apr 26 15:11:52 EDT 2021


https://github.com/python/cpython/commit/425434dadc30d96dc1c0c628f954f9b6f5edd2c9
commit: 425434dadc30d96dc1c0c628f954f9b6f5edd2c9
branch: master
author: Ken Jin <28750310+Fidget-Spinner at users.noreply.github.com>
committer: zooba <steve.dower at microsoft.com>
date: 2021-04-26T20:11:43+01:00
summary:

bpo-40432: Use python 3.8 or higher to compile CPython on Windows (#25389)

files:
A Misc/NEWS.d/next/Windows/2021-04-20-23-07-22.bpo-40432.9OFpoq.rst
M PCbuild/find_python.bat

diff --git a/Misc/NEWS.d/next/Windows/2021-04-20-23-07-22.bpo-40432.9OFpoq.rst b/Misc/NEWS.d/next/Windows/2021-04-20-23-07-22.bpo-40432.9OFpoq.rst
new file mode 100644
index 0000000000000..6f8ce00bf99ec
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2021-04-20-23-07-22.bpo-40432.9OFpoq.rst
@@ -0,0 +1,3 @@
+Updated pegen regeneration script on Windows to find and use Python 3.8 or
+higher.  Prior to this, pegen regeneration already required 3.8 or higher,
+but the script may have used lower versions of Python.
diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat
index 75413cdbfcf43..d0e4a86b01fd0 100644
--- a/PCbuild/find_python.bat
+++ b/PCbuild/find_python.bat
@@ -34,10 +34,10 @@
 @if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") & (set _Py_Python_Source=found in externals directory) & goto :found
 
 @rem If HOST_PYTHON is recent enough, use that
- at 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
+ at if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert sys.version_info[:2] >= (3, 8)" >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
- at for %%p in (3.8 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
+ at for %%p in (3.9 3.8) 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%



More information about the Python-checkins mailing list