mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
Issue #28573: Missing sys._mercurial info and other build issues.
This commit is contained in:
commit
bbf32e1c98
2 changed files with 26 additions and 6 deletions
|
|
@ -406,14 +406,21 @@
|
|||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
<Target Name="_GetBuildInfo" BeforeTargets="PrepareForBuild">
|
||||
<Exec Command="hg id -b > "$(IntDir)hgbranch.txt"" ContinueOnError="true" />
|
||||
<Exec Command="hg id -i > "$(IntDir)hgversion.txt"" ContinueOnError="true" />
|
||||
<Exec Command="hg id -t > "$(IntDir)hgtag.txt"" ContinueOnError="true" />
|
||||
<PropertyGroup>
|
||||
<HG Condition="$(HG) == ''">hg</HG>
|
||||
<_HG>$(HG)</_HG>
|
||||
<_HG Condition="$(HG.Contains(` `))">"$(HG)"</_HG>
|
||||
</PropertyGroup>
|
||||
<Message Text="Getting build info from $(_HG)" Importance="high" />
|
||||
<Exec Command="$(_HG) id -b > "$(IntDir)hgbranch.txt"" ContinueOnError="true" />
|
||||
<Exec Command="$(_HG) id -i > "$(IntDir)hgversion.txt"" ContinueOnError="true" />
|
||||
<Exec Command="$(_HG) id -t > "$(IntDir)hgtag.txt"" ContinueOnError="true" />
|
||||
<PropertyGroup>
|
||||
<HgBranch Condition="Exists('$(IntDir)hgbranch.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgbranch.txt').Trim())</HgBranch>
|
||||
<HgVersion Condition="Exists('$(IntDir)hgversion.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgversion.txt').Trim())</HgVersion>
|
||||
<HgTag Condition="Exists('$(IntDir)hgtag.txt')">$([System.IO.File]::ReadAllText('$(IntDir)hgtag.txt').Trim())</HgTag>
|
||||
</PropertyGroup>
|
||||
<Message Text="Building $(HgTag):$(HgVersion) $(HgBranch)" Importance="high" />
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\Modules\getbuildinfo.c">
|
||||
<PreprocessorDefinitions>HGVERSION="$(HgVersion)";HGTAG="$(HgTag)";HGBRANCH="$(HgBranch)";%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue