summaryrefslogtreecommitdiffstats
path: root/Tools/nuget/make_pkg.proj
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-12-07 11:57:43 (GMT)
committerGitHub <noreply@github.com>2018-12-07 11:57:43 (GMT)
commitcb0b78a070ea3b704416e74f64046178ae0dff3e (patch)
tree870d16be7589c152a71a31df5824d4ae29a2c042 /Tools/nuget/make_pkg.proj
parent8452ca15f41061c8a6297d7956df22ab476d4df4 (diff)
downloadcpython-cb0b78a070ea3b704416e74f64046178ae0dff3e.zip
cpython-cb0b78a070ea3b704416e74f64046178ae0dff3e.tar.gz
cpython-cb0b78a070ea3b704416e74f64046178ae0dff3e.tar.bz2
Revert "bpo-34977: Add Windows App Store package (GH-10245)" (GH-11019)
This reverts commit 468a15aaf9206448a744fc5eab3fc21f51966aad.
Diffstat (limited to 'Tools/nuget/make_pkg.proj')
-rw-r--r--Tools/nuget/make_pkg.proj38
1 files changed, 25 insertions, 13 deletions
diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj
index e093a6d..9843bc9 100644
--- a/Tools/nuget/make_pkg.proj
+++ b/Tools/nuget/make_pkg.proj
@@ -20,28 +20,25 @@
<SignOutput>false</SignOutput>
<TargetName>$(OutputName).$(NuspecVersion)</TargetName>
<TargetExt>.nupkg</TargetExt>
- <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)\</IntermediateOutputPath>
+ <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)</IntermediateOutputPath>
- <CleanCommand>rmdir /q/s "$(IntermediateOutputPath.TrimEnd(`\`))"</CleanCommand>
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>
- <PythonArguments>"$(PythonExe)" "$(PySourcePath)PC\layout"</PythonArguments>
- <PythonArguments>$(PythonArguments) -b "$(BuildPath.TrimEnd(`\`))" -s "$(PySourcePath.TrimEnd(`\`))"</PythonArguments>
- <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)obj"</PythonArguments>
- <PythonArguments>$(PythonArguments) --copy "$(IntermediateOutputPath)pkg"</PythonArguments>
- <PythonArguments>$(PythonArguments) --include-dev --include-tools --include-pip --include-stable --include-launcher --include-props</PythonArguments>
+ <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
+ <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -b "$(BuildPath.TrimEnd(`\`))"</PythonArguments>
- <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)pkg\pip.exe" -B -m pip install -U $(Packages)</PackageArguments>
+ <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append(r'$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
+ <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)\python.exe" -B -m pip install -U $(Packages)</PackageArguments>
- <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)pkg"</NugetPackCommand>
+ <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)"</NugetPackCommand>
<NugetPackSymbolsCommand Condition="Exists('$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec')">"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec" -BasePath "$(BuildPath.TrimEnd(`\`))"</NugetPackSymbolsCommand>
<NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>
<NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>
<NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>
+ <Environment>set DOC_FILENAME=python$(PythonVersion).chm</Environment>
<Environment>$(Environment)%0D%0Aset PYTHONPATH=$(PySourcePath)Lib</Environment>
- <Environment>$(Environment)%0D%0Aset PYTHON_NUSPEC_VERSION=$(NuspecVersion)</Environment>
- <Environment Condition="$(Platform) != 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=$(Platform)</Environment>
- <Environment Condition="$(Platform) == 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=Win32</Environment>
+ <Environment Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</Environment>
<Environment>$(Environment)%0D%0Amkdir "$(OutputPath.Trim(`\`))" &gt;nul 2&gt;nul</Environment>
</PropertyGroup>
@@ -51,7 +48,22 @@
<Target Name="_Build">
<Exec Command="$(CleanCommand)" />
- <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)%0D%0A$(PackageArguments)" />
+ <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) != ''" />