Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
| 2 | <Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
| 3 | <PropertyGroup> |
| 4 | <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid> |
| 5 | <OutputName>python</OutputName> |
| 6 | <OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName> |
| 7 | <OutputSuffix></OutputSuffix> |
| 8 | <SupportSigning>false</SupportSigning> |
| 9 | </PropertyGroup> |
| 10 | |
| 11 | <Import Project="..\msi\msi.props" /> |
| 12 | |
| 13 | <PropertyGroup> |
| 14 | <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget> |
| 15 | <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion> |
| 16 | <SignOutput>false</SignOutput> |
| 17 | <TargetName>$(OutputName).$(NuspecVersion)</TargetName> |
| 18 | <TargetExt>.nupkg</TargetExt> |
| 19 | <TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath> |
| 20 | <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)</IntermediateOutputPath> |
| 21 | |
| 22 | <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand> |
| 23 | |
| 24 | <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments> |
| 25 | <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments> |
| 26 | |
Steve Dower | 3f9fbfc | 2016-06-24 11:37:50 -0700 | [diff] [blame] | 27 | <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append('$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments> |
| 28 | |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 29 | <NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments> |
| 30 | <NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments> |
| 31 | <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath)\en-us"</NugetArguments> |
| 32 | <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments> |
| 33 | <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments> |
| 34 | |
| 35 | <Environment>setlocal |
| 36 | set DOC_FILENAME=python$(PythonVersion).chm |
| 37 | set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment> |
| 38 | </PropertyGroup> |
| 39 | |
| 40 | <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))"> |
| 41 | <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." /> |
| 42 | </Target> |
| 43 | |
| 44 | <Target Name="_Build"> |
Steve Dower | 3f9fbfc | 2016-06-24 11:37:50 -0700 | [diff] [blame] | 45 | <Exec Command="$(CleanCommand)" /> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 46 | <Exec Command="$(Environment) |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 47 | $(PythonArguments)" /> |
Steve Dower | 3f9fbfc | 2016-06-24 11:37:50 -0700 | [diff] [blame] | 48 | <Exec Command="$(PipArguments)" /> |
Steve Dower | 33f7310 | 2016-06-24 10:32:15 -0700 | [diff] [blame] | 49 | <Exec Command="$(NugetArguments)" /> |
| 50 | </Target> |
| 51 | |
| 52 | <Target Name="AfterBuild" /> |
| 53 | <Target Name="Build" DependsOnTargets="_Build;AfterBuild" /> |
| 54 | </Project> |