]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen...
authorCharlie Zhao <zhaoyu_hit@qq.com>
Wed, 7 Sep 2022 20:26:53 +0000 (04:26 +0800)
committerGitHub <noreply@github.com>
Wed, 7 Sep 2022 20:26:53 +0000 (21:26 +0100)
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 0e446fe46eb070f8313409a85a5439a29ff2d4cf..39939a7ba9834503fc9869247eeb6dbd2c1f9a89 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 8d143a4f604ae69c0df907138faaf3d890d867cb..d9e4d981aa2189ba0bb8cff81e645ff0b9d134fa 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" />