Skip to content

gh-94781: Clean previous instances of ouput files on Windows #96423

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Sep 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 4 additions & 0 deletions PCbuild/_freeze_module.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,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>
12 changes: 12 additions & 0 deletions PCbuild/pcbuild.proj
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand All @@ -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" />
Expand Down