[Python-checkins] gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)

zooba webhook-mailer at python.org
Wed Sep 7 16:27:11 EDT 2022


https://github.com/python/cpython/commit/3e26de3c1f24bf0810eaaf7d75a4332775870e78
commit: 3e26de3c1f24bf0810eaaf7d75a4332775870e78
branch: main
author: Charlie Zhao <zhaoyu_hit at qq.com>
committer: zooba <steve.dower at microsoft.com>
date: 2022年09月07日T21:26:53+01:00
summary:
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)
files:
A Misc/NEWS.d/next/Windows/2022-08-30-12-01-51.gh-issue-94781.OxO-Gr.rst
M PCbuild/_freeze_module.vcxproj
M PCbuild/pcbuild.proj
diff --git a/Misc/NEWS.d/next/Windows/2022-08-30-12-01-51.gh-issue-94781.OxO-Gr.rst b/Misc/NEWS.d/next/Windows/2022-08-30-12-01-51.gh-issue-94781.OxO-Gr.rst
new file mode 100644
index 00000000000..d343173d40d
--- /dev/null
+++ b/Misc/NEWS.d/next/Windows/2022-08-30-12-01-51.gh-issue-94781.OxO-Gr.rst
@@ -0,0 +1,2 @@
+Fix :file:`pcbuild.proj` to clean previous instances of ouput files in ``Python\deepfreeze`` and
+``Python\frozen_modules`` directories on Windows. Patch by Charlie Zhao.
diff --git a/PCbuild/_freeze_module.vcxproj b/PCbuild/_freeze_module.vcxproj
index 0e446fe46eb..39939a7ba98 100644
--- a/PCbuild/_freeze_module.vcxproj
+++ b/PCbuild/_freeze_module.vcxproj
@@ -425,6 +425,10 @@
 <Target Name="_CleanFrozen" BeforeTargets="CoreClean" Condition="$(Configuration) != 'PGUpdate'">
 <ItemGroup>
 <Clean Include="%(None.IntFile)" />
+ <Clean Include="%(None.OutFile)" />
+ <Clean Include="%(GetPath.IntFile)" />
+ <Clean Include="%(GetPath.OutFile)" />
+ <Clean Include="$(PySourcePath)Python\deepfreeze\deepfreeze.c" />
 </ItemGroup>
 </Target>
 </Project>
diff --git a/PCbuild/pcbuild.proj b/PCbuild/pcbuild.proj
index 8d143a4f604..d9e4d981aa2 100644
--- a/PCbuild/pcbuild.proj
+++ b/PCbuild/pcbuild.proj
@@ -125,6 +125,12 @@
 StopOnFirstFailure="false"
 Condition="%(CleanTarget) != ''"
 Targets="%(CleanTarget)" />
+ <MSBuild Projects="@(FreezeProjects)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanTarget) != ''"
+ Targets="%(CleanTarget)" />
 </Target>
 
 <Target Name="CleanAll">
@@ -140,6 +146,12 @@
 StopOnFirstFailure="false"
 Condition="%(CleanAllTarget) != ''"
 Targets="%(CleanAllTarget)" />
+ <MSBuild Projects="@(FreezeProjects)"
+ Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
+ BuildInParallel="%(BuildInParallel)"
+ StopOnFirstFailure="false"
+ Condition="%(CleanTarget) != ''"
+ Targets="%(CleanTarget)" />
 </Target>
 
 <Target Name="Rebuild" DependsOnTargets="Clean;Build" />


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /