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

This commit is contained in:
Charlie Zhao 2022-09-08 04:26:53 +08:00 committed by GitHub
parent de33df27aa
commit 3e26de3c1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 0 deletions

View File

@ -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.

View File

@ -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>

View File

@ -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" />