Debian Codegraph @

Tools/nuget/make_pkg.proj

raw
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 <OutputName Condition="$(Platform) == 'ARM'">$(OutputName)arm32</OutputName>
8 <OutputName Condition="$(BuildForDaily) == 'true'">$(OutputName)daily</OutputName>
9 <OutputSuffix></OutputSuffix>
10 <SupportSigning>false</SupportSigning>
11 <BuildForRelease Condition="$(BuildForRelease) == ''">true</BuildForRelease>
12 </PropertyGroup>
13
14 <Import Project="..\msi\msi.props" />
15
16 <PropertyGroup>
17 <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>
18 <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
19 <NuspecVersion Condition="$(ReleaseLevelName) != ''">$(NuspecVersion)-$(ReleaseLevelName)</NuspecVersion>
20 <NuspecVersion Condition="$(BuildForDaily) == 'true'">$(MajorVersionNumber).$(MinorVersionNumber).$(DailyBuildVersion)</NuspecVersion>
21 <SignOutput>false</SignOutput>
22 <TargetName>$(OutputName).$(NuspecVersion)</TargetName>
23 <TargetExt>.nupkg</TargetExt>
24 <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)\</IntermediateOutputPath>
25
26 <CleanCommand>rmdir /q/s "$(IntermediateOutputPath.TrimEnd(`\`))"</CleanCommand>
27
28 <PythonArguments>"$(PythonExe)" "$(PySourcePath)PC\layout"</PythonArguments>
29 <PythonArguments>$(PythonArguments) -b "$(BuildPath.TrimEnd(`\`))" -s "$(PySourcePath.TrimEnd(`\`))"</PythonArguments>
30 <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)obj"</PythonArguments>
31 <PythonArguments>$(PythonArguments) --copy "$(IntermediateOutputPath)pkg"</PythonArguments>
32 <PythonArguments>$(PythonArguments) --preset-nuget</PythonArguments>
33
34 <PackageArguments Condition="$(Packages) != ''">"$(IntermediateOutputPath)pkg\pip.exe" -B -m pip install -U $(Packages)</PackageArguments>
35
36 <NugetPackCommand>"$(Nuget)" pack "$(IntermediateOutputPath)pkg\python.nuspec" -BasePath "$(IntermediateOutputPath)pkg"</NugetPackCommand>
37 <NugetPackSymbolsCommand Condition="Exists('$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec')">"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).symbols.nuspec" -BasePath "$(BuildPath.TrimEnd(`\`))"</NugetPackSymbolsCommand>
38 <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath.Trim(`\`))"</NugetArguments>
39 <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>
40 <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>
41
42 <Environment>$(Environment)%0D%0Aset PYTHONPATH=$(PySourcePath)Lib</Environment>
43 <Environment>$(Environment)%0D%0Aset PYTHON_NUSPEC_VERSION=$(NuspecVersion)</Environment>
44 <Environment Condition="$(Platform) != 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=$(Platform)</Environment>
45 <Environment Condition="$(Platform) == 'x86'">$(Environment)%0D%0Aset PYTHON_PROPS_PLATFORM=Win32</Environment>
46 <Environment>$(Environment)%0D%0Amkdir "$(OutputPath.Trim(`\`))" &gt;nul 2&gt;nul</Environment>
47 </PropertyGroup>
48
49 <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">
50 <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." />
51 </Target>
52
53 <Target Name="_Build">
54 <Exec Command="$(CleanCommand)" />
55 <Exec Command="setlocal%0D%0A$(Environment)%0D%0A$(PythonArguments)%0D%0A$(PackageArguments)" />
56
57 <Exec Command="$(NugetPackCommand) $(NugetArguments)" />
58 <Exec Command="$(NugetPackSymbolsCommand) $(NugetArguments)" Condition="$(NugetPackSymbolsCommand) != ''" />
59 </Target>
60
61 <Target Name="AfterBuild" />
62 <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
63 </Project>