summaryrefslogtreecommitdiffstats
path: root/PCbuild/_freeze_importlib.vcxproj
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-12-12 19:17:59 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-12-12 19:17:59 (GMT)
commit10beb3cfef97d162b49b95c538c69c17a20bc910 (patch)
tree313bcc04cd62c40998c4da5f48a01533a981ee2a /PCbuild/_freeze_importlib.vcxproj
parent452b3a6a3e9e4ca99d9c6caff367fce749a7ec58 (diff)
downloadcpython-10beb3cfef97d162b49b95c538c69c17a20bc910.zip
cpython-10beb3cfef97d162b49b95c538c69c17a20bc910.tar.gz
cpython-10beb3cfef97d162b49b95c538c69c17a20bc910.tar.bz2
Issue #28896: Disable WindowsRegistryFinder by default.
Diffstat (limited to 'PCbuild/_freeze_importlib.vcxproj')
-rw-r--r--PCbuild/_freeze_importlib.vcxproj37
1 files changed, 25 insertions, 12 deletions
diff --git a/PCbuild/_freeze_importlib.vcxproj b/PCbuild/_freeze_importlib.vcxproj
index f7714c0..c732663 100644
--- a/PCbuild/_freeze_importlib.vcxproj
+++ b/PCbuild/_freeze_importlib.vcxproj
@@ -76,31 +76,44 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
- <None Include="..\Lib\importlib\_bootstrap.py" />
+ <None Include="..\Lib\importlib\_bootstrap.py">
+ <IntFile>$(IntDir)importlib.g.h</IntFile>
+ <OutFile>$(PySourcePath)Python\importlib.h</OutFile>
+ </None>
+ <None Include="..\Lib\importlib\_bootstrap_external.py">
+ <IntFile>$(IntDir)importlib_external.g.h</IntFile>
+ <OutFile>$(PySourcePath)Python\importlib_external.h</OutFile>
+ </None>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
- <Target Name="RebuildImportLib" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug' or $(Configuration) == 'Release'">
- <Exec Command='"$(TargetPath)" "$(PySourcePath)Lib\importlib\_bootstrap.py" "$(IntDir)importlib.g.h"' />
+ <Target Name="_RebuildImportLib">
+ <Exec Command='"$(TargetPath)" "%(None.FullPath)" "%(None.IntFile)"' />
<PropertyGroup>
- <_OldContent Condition="Exists('$(PySourcePath)Python\importlib.h')">$([System.IO.File]::ReadAllText('$(PySourcePath)Python\importlib.h').Replace(`&#x0D;&#x0A;`, `&#x0A;`))</_OldContent>
- <_NewContent Condition="Exists('$(IntDir)importlib.g.h')">$([System.IO.File]::ReadAllText('$(IntDir)importlib.g.h').Replace(`&#x0D;&#x0A;`, `&#x0A;`))</_NewContent>
+ <_OldContent Condition="Exists($(OutTargetPath))"></_OldContent>
+ <_NewContent Condition="Exists($(IntTargetPath))">$([System.IO.File]::ReadAllText($(IntTargetPath)).Replace(`&#x0D;&#x0A;`, `&#x0A;`))</_NewContent>
</PropertyGroup>
- <Copy SourceFiles="$(IntDir)importlib.g.h"
- DestinationFiles="$(PySourcePath)Python\importlib.h"
- Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)'" />
+ <Copy SourceFiles="%(None.IntFile)"
+ DestinationFiles="%(None.OutFile)"
+ Condition="!Exists(%(None.OutFile)) or (Exists(%(None.IntFile)) and '$([System.IO.File]::ReadAllText(%(None.OutFile)).Replace(`&#x0D;&#x0A;`, `&#x0A;`))' != '$([System.IO.File]::ReadAllText(%(None.IntFile)).Replace(`&#x0D;&#x0A;`, `&#x0A;`))')">
+ <Output TaskParameter="CopiedFiles" ItemName="_Updated" />
+ </Copy>
- <Warning Text="importlib.h has been updated. You will need to rebuild pythoncore to see the changes."
- Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)' and $(Configuration) == 'Debug'" />
- <Error Text="importlib.h has been updated. You will need to rebuild pythoncore to see the changes."
- Condition="Exists('$(IntDir)importlib.g.h') and '$(_OldContent)' != '$(_NewContent)' and $(Configuration) == 'Release'" />
+ <Warning Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."
+ Condition="'@(_Updated)' != '' and $(Configuration) == 'Debug'" />
+ <Error Text="@(_Updated->'%(Filename)%(Extension)',', ') updated. You will need to rebuild pythoncore to see the changes."
+ Condition="'@(_Updated)' != '' and $(Configuration) == 'Release'" />
+ </Target>
+ <Target Name="RebuildImportLib" AfterTargets="AfterBuild" Condition="$(Configuration) == 'Debug' or $(Configuration) == 'Release'"
+ DependsOnTargets="_RebuildImportLib">
</Target>
<Target Name="_CleanImportLib" BeforeTargets="CoreClean">
<ItemGroup>
<Clean Include="$(IntDir)importlib.g.h" />
+ <Clean Include="$(IntDir)importlib_external.g.h" />
</ItemGroup>
</Target>
</Project>