Skip to content

Commit 3e26de3

Browse files
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)
1 parent de33df2 commit 3e26de3

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix :file:`pcbuild.proj` to clean previous instances of ouput files in ``Python\deepfreeze`` and
2+
``Python\frozen_modules`` directories on Windows. Patch by Charlie Zhao.

PCbuild/_freeze_module.vcxproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,10 @@
425425
<Target Name="_CleanFrozen" BeforeTargets="CoreClean" Condition="$(Configuration) != 'PGUpdate'">
426426
<ItemGroup>
427427
<Clean Include="%(None.IntFile)" />
428+
<Clean Include="%(None.OutFile)" />
429+
<Clean Include="%(GetPath.IntFile)" />
430+
<Clean Include="%(GetPath.OutFile)" />
431+
<Clean Include="$(PySourcePath)Python\deepfreeze\deepfreeze.c" />
428432
</ItemGroup>
429433
</Target>
430434
</Project>

PCbuild/pcbuild.proj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,12 @@
125125
StopOnFirstFailure="false"
126126
Condition="%(CleanTarget) != ''"
127127
Targets="%(CleanTarget)" />
128+
<MSBuild Projects="@(FreezeProjects)"
129+
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
130+
BuildInParallel="%(BuildInParallel)"
131+
StopOnFirstFailure="false"
132+
Condition="%(CleanTarget) != ''"
133+
Targets="%(CleanTarget)" />
128134
</Target>
129135

130136
<Target Name="CleanAll">
@@ -140,6 +146,12 @@
140146
StopOnFirstFailure="false"
141147
Condition="%(CleanAllTarget) != ''"
142148
Targets="%(CleanAllTarget)" />
149+
<MSBuild Projects="@(FreezeProjects)"
150+
Properties="Configuration=%(Configuration);Platform=%(Platform);%(Properties)"
151+
BuildInParallel="%(BuildInParallel)"
152+
StopOnFirstFailure="false"
153+
Condition="%(CleanTarget) != ''"
154+
Targets="%(CleanTarget)" />
143155
</Target>
144156

145157
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />

0 commit comments

Comments
 (0)