summaryrefslogtreecommitdiffstats
path: root/Tools/nuget/make_pkg.proj
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-06-24 17:32:15 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-06-24 17:32:15 (GMT)
commit33f7310c5eeedf12690c3548e3315dbbfff6b770 (patch)
tree9efdb9b09502235f62f0ddb87f6da7587a670f68 /Tools/nuget/make_pkg.proj
parenta0643829252f523e0b607ec3674da748f5306d7b (diff)
downloadcpython-33f7310c5eeedf12690c3548e3315dbbfff6b770.zip
cpython-33f7310c5eeedf12690c3548e3315dbbfff6b770.tar.gz
cpython-33f7310c5eeedf12690c3548e3315dbbfff6b770.tar.bz2
Adds scripts for producing Nuget packages.
Diffstat (limited to 'Tools/nuget/make_pkg.proj')
-rw-r--r--Tools/nuget/make_pkg.proj51
1 files changed, 51 insertions, 0 deletions
diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj
new file mode 100644
index 0000000..812349a
--- /dev/null
+++ b/Tools/nuget/make_pkg.proj
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{10487945-15D1-4092-A214-338395C4116B}</ProjectGuid>
+ <OutputName>python</OutputName>
+ <OutputName Condition="$(Platform) == 'x86'">$(OutputName)x86</OutputName>
+ <OutputSuffix></OutputSuffix>
+ <SupportSigning>false</SupportSigning>
+ </PropertyGroup>
+
+ <Import Project="..\msi\msi.props" />
+
+ <PropertyGroup>
+ <Nuget Condition="$(Nuget) == ''">$(ExternalsDir)\windows-installer\nuget\nuget.exe</Nuget>
+ <NuspecVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</NuspecVersion>
+ <SignOutput>false</SignOutput>
+ <TargetName>$(OutputName).$(NuspecVersion)</TargetName>
+ <TargetExt>.nupkg</TargetExt>
+ <TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
+ <IntermediateOutputPath>$(IntermediateOutputPath)\nuget_$(ArchName)</IntermediateOutputPath>
+
+ <CleanCommand>rmdir /q/s "$(IntermediateOutputPath)"</CleanCommand>
+
+ <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
+ <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
+
+ <NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>
+ <NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>
+ <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath)\en-us"</NugetArguments>
+ <NugetArguments>$(NugetArguments) -Version "$(NuspecVersion)"</NugetArguments>
+ <NugetArguments>$(NugetArguments) -NoPackageAnalysis -NonInteractive</NugetArguments>
+
+ <Environment>setlocal
+set DOC_FILENAME=python$(PythonVersion).chm
+set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.CRT</Environment>
+ </PropertyGroup>
+
+ <Target Name="_NugetMissing" BeforeTargets="_Build" Condition="!Exists($(Nuget))">
+ <Error Text="$(Nuget) could not be found. Either avoid specifying the property or update your externals/windows-installer files." />
+ </Target>
+
+ <Target Name="_Build">
+ <Exec Command="$(Environment)
+$(CleanCommand)
+$(PythonArguments)" />
+ <Exec Command="$(NugetArguments)" />
+ </Target>
+
+ <Target Name="AfterBuild" />
+ <Target Name="Build" DependsOnTargets="_Build;AfterBuild" />
+</Project>