]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 23 Sep 2022 15:23:41 +0000 (08:23 -0700)
committerGitHub <noreply@github.com>
Fri, 23 Sep 2022 15:23:41 +0000 (16:23 +0100)
(cherry picked from commit 3e26de3c1f24bf0810eaaf7d75a4332775870e78)

Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
Misc/NEWS.d/next/Windows/2022-08-30-12-01-51.gh-issue-94781.OxO-Gr.rst [new file with mode: 0644]
PCbuild/_freeze_module.vcxproj
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 (file)
index 0000000..d343173
--- /dev/null
@@ -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.
index 0a74f5850a1e8e1d9bb2bc27d37afb15eb18283f..442e3437dac90548a86f2f970283617b8aae56c5 100644 (file)
   <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>
index 2ba0627b8336952caf278ada83be085b46144f47..222821adb1d76b5bb099c80d7763330dfaf53eea 100644 (file)
              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">
              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" />