diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-09-07 02:29:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-07 02:29:10 (GMT) |
commit | 1f06a680de465be0c24a78ea3b610053955daa99 (patch) | |
tree | 20baad151d4a42b9b074bf02da48aeb5d07961e0 /Tools/nuget/make_pkg.proj | |
parent | d3b9f97e6d92bbfcf956638344fd827a40837b96 (diff) | |
download | cpython-1f06a680de465be0c24a78ea3b610053955daa99.zip cpython-1f06a680de465be0c24a78ea3b610053955daa99.tar.gz cpython-1f06a680de465be0c24a78ea3b610053955daa99.tar.bz2 |
Add props file for nuget packages (#3410)
Diffstat (limited to 'Tools/nuget/make_pkg.proj')
-rw-r--r-- | Tools/nuget/make_pkg.proj | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj index f21d21e..9843bc9 100644 --- a/Tools/nuget/make_pkg.proj +++ b/Tools/nuget/make_pkg.proj @@ -51,6 +51,20 @@ <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)" /> <Exec Command="$(PipArguments)" /> <Exec Command="$(PackageArguments)" Condition="$(PackageArguments) != ''" /> + + <PropertyGroup> + <_PropsContents>$([System.IO.File]::ReadAllText('python.props'))</_PropsContents> + <_PropsContents>$(_PropsContents.Replace('$$PYTHON_TAG$$', '$(MajorVersionNumber).$(MinorVersionNumber)'))</_PropsContents> + <_PropsContents>$(_PropsContents.Replace('$$PYTHON_VERSION$$', '$(NuspecVersion)'))</_PropsContents> + <_PropsContents Condition="$(Platform) == 'x86'">$(_PropsContents.Replace('$$PYTHON_PLATFORM$$', 'Win32'))</_PropsContents> + <_PropsContents Condition="$(Platform) != 'x86'">$(_PropsContents.Replace('$$PYTHON_PLATFORM$$', '$(Platform)'))</_PropsContents> + <_PropsContents>$(_PropsContents.Replace('$$PYTHON_TARGET$$', '_GetPythonRuntimeFilesDependsOn$(MajorVersionNumber)$(MinorVersionNumber)_$(Platform)'))</_PropsContents> + <_ExistingContents Condition="Exists('$(IntermediateOutputPath)\python.props')">$([System.IO.File]::ReadAllText('$(IntermediateOutputPath)\python.props'))</_ExistingContents> + </PropertyGroup> + <WriteLinesToFile File="$(IntermediateOutputPath)\python.props" + Lines="$(_PropsContents)" + Condition="$(_PropsContents) != $(_ExistingContents)" /> + <Exec Command="$(NugetPackCommand) $(NugetArguments)" /> <Exec Command="$(NugetPackSymbolsCommand) $(NugetArguments)" Condition="$(NugetPackSymbolsCommand) != ''" /> </Target> |