summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2021-11-18 15:23:48 -0800
committerGuido van Rossum <guido@python.org>2021-11-18 15:23:48 -0800
commit87c6cb4f9ead95d35ca61d32567f4c611d97bd48 (patch)
tree113157a0201bc23adac45684143d3025bc641852
parentde230cb3020c4d47e421323d05178bd996f31f94 (diff)
downloadcpython-git-windeepfreeze.tar.gz
Generate .c files in _freeze_module.vcxprojwindeepfreeze
(But needs work, to avoid recompiling each time.)
-rw-r--r--PCbuild/_freeze_module.vcxproj2
-rw-r--r--PCbuild/find_python.bat4
2 files changed, 4 insertions, 2 deletions
diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
index d33e07c54b..109b0b6349 100644
--- a/PCbuild/_freeze_module.vcxproj
+++ b/PCbuild/_freeze_module.vcxproj
@@ -337,6 +337,8 @@
</ImportGroup>
<Target Name="_RebuildFrozen" AfterTargets="AfterBuild" Condition="$(Configuration) != 'PGUpdate'">
<Exec Command='"$(TargetPath)" "%(None.ModName)" "%(None.FullPath)" "%(None.IntFile)"' />
+ <Exec Command='$(PythonForBuild) "$(PySourcePath)Tools\scripts\deepfreeze.py" "%(None.OutFile)" "-m" "%(None.ModName)" -o "$(PySourcePath)Python\deepfreeze\%(None.ModName).c"' />
+ <!-- TODO: Use a temp file for deepfreeze.py output and copy conditionally, like below -->
<Copy SourceFiles="%(None.IntFile)"
DestinationFiles="%(None.OutFile)"
diff --git a/PCbuild/find_python.bat b/PCbuild/find_python.bat
index d0e4a86b01..35b5601ff3 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
-@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
+@if NOT "%HOST_PYTHON%"=="" @%HOST_PYTHON% -Ec "import sys; assert sys.version_info[:2] >= (3, 10)" >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
-@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
+@for %%p in (3.10) 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%