blob: 15e6d8f38915ab60bd8cc51051f195801110dcd2 [file] [log] [blame]
Steve Dower33f73102016-06-24 10:32:15 -07001<?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 Dower3f9fbfc2016-06-24 11:37:50 -070027 <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append('$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
28
Steve Dower33f73102016-06-24 10:32:15 -070029 <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
36set DOC_FILENAME=python$(PythonVersion).chm
37set 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 Dower3f9fbfc2016-06-24 11:37:50 -070045 <Exec Command="$(CleanCommand)" />
Steve Dower33f73102016-06-24 10:32:15 -070046 <Exec Command="$(Environment)
Steve Dower33f73102016-06-24 10:32:15 -070047$(PythonArguments)" />
Steve Dower3f9fbfc2016-06-24 11:37:50 -070048 <Exec Command="$(PipArguments)" />
Steve Dower33f73102016-06-24 10:32:15 -070049 <Exec Command="$(NugetArguments)" />
50 </Target>
51
52 <Target Name="AfterBuild" />
53 <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
54</Project>