[Python-checkins] gh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)

zooba webhook-mailer at python.org
Mon Jun 27 15:48:55 EDT 2022


https://github.com/python/cpython/commit/acc6468f7ee0d1f22633f0b84df28f69e75f1260
commit: acc6468f7ee0d1f22633f0b84df28f69e75f1260
branch: main
author: Shixian Li <34830785+znsoooo at users.noreply.github.com>
committer: zooba <steve.dower at microsoft.com>
date: 2022-06-27T20:48:36+01:00
summary:

gh-94280: Require Python 3.9 or higher to compile CPython on Windows (GH-94281)

files:
A Misc/NEWS.d/next/Build/2022-06-25-23-25-47.gh-issue-94280.YhEyW_.rst
M PCbuild/find_python.bat

diff --git a/Misc/NEWS.d/next/Build/2022-06-25-23-25-47.gh-issue-94280.YhEyW_.rst b/Misc/NEWS.d/next/Build/2022-06-25-23-25-47.gh-issue-94280.YhEyW_.rst
new file mode 100644
index 0000000000000..1199e842177d7
--- /dev/null
+++ b/Misc/NEWS.d/next/Build/2022-06-25-23-25-47.gh-issue-94280.YhEyW_.rst
@@ -0,0 +1,3 @@
+Updated pegen regeneration script on Windows to find and use Python 3.9 or
+higher.  Prior to this, pegen regeneration already required 3.9 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 fc1049c550818..11d6cba7a172c 100644
--- a/PCbuild/find_python.bat
+++ b/PCbuild/find_python.bat
@@ -39,10 +39,10 @@
 @if exist "%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" ("%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe" -Ec "import sys; assert sys.version_info[:2] >= (3, 8)" >nul 2>nul) && (set PYTHON="%_Py_EXTERNALS_DIR%\pythonx86\tools\python.exe") && (set _Py_Python_Source=found in externals directory) && goto :found || rmdir /Q /S "%_Py_EXTERNALS_DIR%\pythonx86"
 
 @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, 8)" >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, 9)" >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.10 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
+ at for %%p in (3.10 3.9) 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