8000 gh-94781: Fix Windows projects not cleaning intermediate and output f… · python/cpython@512b305 · GitHub
[go: up one dir, main page]

Skip to content

Commit 512b305

Browse files
gh-94781: Fix Windows projects not cleaning intermediate and output files for frozen modules (GH-96423)
(cherry picked from commit 3e26de3) Co-authored-by: Charlie Zhao <zhaoyu_hit@qq.com>
1 parent dc9065f commit 512b305

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
@@ -424,6 +424,10 @@
424424
<Target Name="_CleanFrozen" BeforeTargets="CoreClean" Condition="$(Configuration) != 'PGUpdate'">
425425
<ItemGroup>
426426
<Clean Include="%(None.IntFile)" />
427+
<Clean Include="%(None.OutFile)" />
428+
<Clean Include="%(GetPath.IntFile)" />
429+
<Clean Include="%(GetPath.OutFile)" />
430+
<Clean Include="$(PySourcePath)Python\deepfreeze\deepfreeze.c" />
427431
</ItemGroup>
428432
</Target>
429433
</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)
0