mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
Fix build batch files (#2750)
* Enable building MSI, zip and nuget packages when Py_OutDir is set. * Restore the --build option, which got reverted at some point. * Ensure output directory is created. * Enables BuildForDaily and DailyBuildVersion options for nuget package.
This commit is contained in:
parent
e7bc7aac3d
commit
f0851910eb
6 changed files with 49 additions and 21 deletions
|
@ -4,6 +4,7 @@
|
|||
<ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
|
||||
<OutputName>python</OutputName>
|
||||
<OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName>
|
||||
<OutputName Condition="$(BuildForDaily) == 'true'">$(OutputName)daily</OutputName>
|
||||
<OutputSuffix></OutputSuffix>
|
||||
<SupportSigning>false</SupportSigning>
|
||||
<BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease>
|
||||
|
@ -15,6 +16,7 @@
|
|||
<Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>
|
||||
<NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
|
||||
<NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>
|
||||
<NuspecVersion Condition="$(BuildForDaily) == 'true'">$(MajorVersionNumber).$(MinorVersionNumber).$(DailyBuildVersion)</NuspecVersion>
|
||||
<SignOutput>false</SignOutput>
|
||||
<TargetName>$(OutputName).$(NuspecVersion)</TargetName>
|
||||
<TargetExt>.nupkg</TargetExt>
|
||||
|
@ -23,7 +25,7 @@
|
|||
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>
|
||||
|
||||
<PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
|
||||
<PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
|
||||
<PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -b "$(BuildPath.TrimEnd(`\`))"</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>
|
||||
|
@ -35,7 +37,9 @@
|
|||
<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%0Amkdir "$(OutputPath.Trim(`\`))" >nul 2>nul</Environment>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue