2016-06-24 15:39:57 -03:00
|
|
|
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
|
|
<PropertyGroup>
|
|
|
|
<ProjectGuid>{6BA7092C-0093-47F0-9ED2-282AEE981E14}</ProjectGuid>
|
|
|
|
<OutputName>python2</OutputName>
|
|
|
|
<OutputName Condition="$(Platform) == 'x86' or $(Platform) == 'Win32' or $(Platform) == ''">$(OutputName)x86</OutputName>
|
|
|
|
<OutputPath Condition="$(OutputPath) == ''">$(MSBuildThisFileDirectory)</OutputPath>
|
|
|
|
<OutputSuffix></OutputSuffix>
|
|
|
|
<SupportSigning>false</SupportSigning>
|
2016-06-27 13:54:03 -03:00
|
|
|
<BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease>
|
2016-06-24 15:39:57 -03:00
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Import Project="..\..\PCBuild\python.props" />
|
|
|
|
|
|
|
|
<PropertyGroup>
|
|
|
|
<NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
|
2017-08-26 22:00:48 -03:00
|
|
|
<NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>
|
2016-06-24 15:39:57 -03:00
|
|
|
<SignOutput>false</SignOutput>
|
|
|
|
<TargetName>$(OutputName).$(NuspecVersion)</TargetName>
|
|
|
|
<TargetExt>.nupkg</TargetExt>
|
|
|
|
<TargetPath>$(OutputPath)\$(TargetName)$(TargetExt)</TargetPath>
|
|
|
|
<IntermediateOutputPath>$(MSBuildThisFileDirectory)\obj_$(ArchName)</IntermediateOutputPath>
|
|
|
|
|
|
|
|
<CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>
|
|
|
|
|
|
|
|
<Python Condition="$(Python) == ''">py</Python>
|
|
|
|
<PythonArguments>"$(Python)" "$(MSBuildThisFileDirectory)\make_zip.py"</PythonArguments>
|
|
|
|
<PythonArguments>$(PythonArguments) -s "$(PySourcePath.Trim('\'))" -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
|
|
|
|
|
|
|
|
<PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append(r'$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
|
2016-06-27 13:54:03 -03:00
|
|
|
<PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)\python.exe" -B -m pip install -U $(Packages)</PackageArguments>
|
2016-06-24 15:39:57 -03:00
|
|
|
|
|
|
|
<NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>
|
|
|
|
<NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>
|
2016-06-27 13:54:03 -03:00
|
|
|
<NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>
|
2016-06-24 15:39:57 -03:00
|
|
|
<NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>
|
|
|
|
<NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>
|
|
|
|
</PropertyGroup>
|
|
|
|
|
|
|
|
<Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">
|
|
|
|
<Error Text="$$(Nuget) could not be found. Specify a valid path on the command line." />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="_Build">
|
|
|
|
<Exec Command="$(CleanCommand)" />
|
|
|
|
<Exec Command="$(PythonArguments)" />
|
|
|
|
<Exec Command="$(PipArguments)" />
|
2016-06-27 13:54:03 -03:00
|
|
|
<Exec Command="$(PackageArguments)" Condition="$(PackageArguments) != ''" />
|
2016-06-24 15:39:57 -03:00
|
|
|
<Exec Command="$(NugetArguments)" />
|
|
|
|
</Target>
|
|
|
|
|
|
|
|
<Target Name="AfterBuild" />
|
|
|
|
<Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
|
|
|
|
</Project>
|