diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-12-07 05:09:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 05:09:20 (GMT) |
commit | 468a15aaf9206448a744fc5eab3fc21f51966aad (patch) | |
tree | 75c8f2aae7835ae7ca718ef8660a4c0899837bd3 /Tools/nuget | |
parent | c9566b8c454120e3d0ddb5ab970f262a6cd80077 (diff) | |
download | cpython-468a15aaf9206448a744fc5eab3fc21f51966aad.zip cpython-468a15aaf9206448a744fc5eab3fc21f51966aad.tar.gz cpython-468a15aaf9206448a744fc5eab3fc21f51966aad.tar.bz2 |
bpo-34977: Add Windows App Store package (GH-10245)
Diffstat (limited to 'Tools/nuget')
-rw-r--r-- | Tools/nuget/make_pkg.proj | 38 | ||||
-rw-r--r-- | Tools/nuget/python.props | 56 |
2 files changed, 13 insertions, 81 deletions
diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj index 9843bc9..e093a6d 100644 --- a/Tools/nuget/make_pkg.proj +++ b/Tools/nuget/make_pkg.proj @@ -20,25 +20,28 @@ <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)"</CleanCommand> + <CleanCommand>rmdir /q/s "$(IntermediateOutputPath.TrimEnd(`\`))"</CleanCommand> - <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments> - <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -b "$(BuildPath.TrimEnd(`\`))"</PythonArguments> + <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> - <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> + <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)pkg\pip.exe" -B -m pip install -U $(Packages)</PackageArguments> - <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)"</NugetPackCommand> + <NugetPackCommand>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec" -BasePath "$(IntermediateOutputPath)pkg"</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 Condition="Exists($(CRTRedist))">$(Environment)%0D%0Aset VCREDIST_PATH=$(CRTRedist)\$(Platform)</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>$(Environment)%0D%0Amkdir "$(OutputPath.Trim(`\`))" >nul 2>nul</Environment> </PropertyGroup> @@ -48,22 +51,7 @@ <Target Name="_Build"> <Exec Command="$(CleanCommand)" /> - <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="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)%0D%0A$(PackageArguments)" /> <Exec Command="$(NugetPackCommand) $(NugetArguments)" /> <Exec Command="$(NugetPackSymbolsCommand) $(NugetArguments)" Condition="$(NugetPackSymbolsCommand) != ''" /> diff --git a/Tools/nuget/python.props b/Tools/nuget/python.props deleted file mode 100644 index 4cc7008..0000000 --- a/Tools/nuget/python.props +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup Condition="$(Platform) == '$$PYTHON_PLATFORM$$'"> - <PythonHome>$(MSBuildThisFileDirectory)\..\..\tools</PythonHome> - <PythonInclude>$(PythonHome)\include</PythonInclude> - <PythonLibs>$(PythonHome)\libs</PythonLibs> - <PythonTag>$$PYTHON_TAG$$</PythonTag> - <PythonVersion>$$PYTHON_VERSION$$</PythonVersion> - - <IncludePythonExe Condition="$(IncludePythonExe) == ''">true</IncludePythonExe> - <IncludeDistutils Condition="$(IncludeDistutils) == ''">false</IncludeDistutils> - <IncludeLib2To3 Condition="$(IncludeLib2To3) == ''">false</IncludeLib2To3> - <IncludeVEnv Condition="$(IncludeVEnv) == ''">false</IncludeVEnv> - - <GetPythonRuntimeFilesDependsOn>$$PYTHON_TARGET$$;$(GetPythonRuntimeFilesDependsOn)</GetPythonRuntimeFilesDependsOn> - </PropertyGroup> - - <ItemDefinitionGroup Condition="$(Platform) == '$$PYTHON_PLATFORM$$'"> - <ClCompile> - <AdditionalIncludeDirectories>$(PythonInclude);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories> - <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary> - </ClCompile> - <Link> - <AdditionalLibraryDirectories>$(PythonLibs);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> - </Link> - </ItemDefinitionGroup> - - <Target Name="GetPythonRuntimeFiles" Returns="@(PythonRuntime)" DependsOnTargets="$(GetPythonRuntimeFilesDependsOn)" /> - - <Target Name="$$PYTHON_TARGET$$" Returns="@(PythonRuntime)"> - <ItemGroup> - <_PythonRuntimeExe Include="$(PythonHome)\python*.dll" /> - <_PythonRuntimeExe Include="$(PythonHome)\vcruntime140.dll" /> - <_PythonRuntimeExe Include="$(PythonHome)\python*.exe" Condition="$(IncludePythonExe) == 'true'" /> - <_PythonRuntimeExe> - <Link>%(Filename)%(Extension)</Link> - </_PythonRuntimeExe> - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.pyd" /> - <_PythonRuntimeDlls Include="$(PythonHome)\DLLs\*.dll" /> - <_PythonRuntimeDlls> - <Link>DLLs\%(Filename)%(Extension)</Link> - </_PythonRuntimeDlls> - <_PythonRuntimeLib Include="$(PythonHome)\Lib\**\*" Exclude="$(PythonHome)\Lib\**\*.pyc;$(PythonHome)\Lib\site-packages\**\*" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\distutils\**\*" Condition="$(IncludeDistutils) != 'true'" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\lib2to3\**\*" Condition="$(IncludeLib2To3) != 'true'" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\ensurepip\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib Remove="$(PythonHome)\Lib\venv\**\*" Condition="$(IncludeVEnv) != 'true'" /> - <_PythonRuntimeLib> - <Link>Lib\%(RecursiveDir)%(Filename)%(Extension)</Link> - </_PythonRuntimeLib> - <PythonRuntime Include="@(_PythonRuntimeExe);@(_PythonRuntimeDlls);@(_PythonRuntimeLib)" /> - </ItemGroup> - - <Message Importance="low" Text="Collected Python runtime from $(PythonHome):%0D%0A@(PythonRuntime->' %(Link)','%0D%0A')" /> - </Target> -</Project> |