summaryrefslogtreecommitdiff
path: root/Tools/nuget
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-06-24 10:32:15 -0700
committerSteve Dower <steve.dower@microsoft.com>2016-06-24 10:32:15 -0700
commit33f7310c5eeedf12690c3548e3315dbbfff6b770 (patch)
tree9efdb9b09502235f62f0ddb87f6da7587a670f68 /Tools/nuget
parenta0643829252f523e0b607ec3674da748f5306d7b (diff)
downloadcpython-git-33f7310c5eeedf12690c3548e3315dbbfff6b770.tar.gz
Adds scripts for producing Nuget packages.
Diffstat (limited to 'Tools/nuget')
-rw-r--r--Tools/nuget/make_pkg.proj51
-rw-r--r--Tools/nuget/python.nuspec18
-rw-r--r--Tools/nuget/pythonx86.nuspec18
3 files changed, 87 insertions, 0 deletions
diff --git a/Tools/nuget/make_pkg.proj b/Tools/nuget/make_pkg.proj
new file mode 100644
index 0000000000..812349a43f
--- /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>
diff --git a/Tools/nuget/python.nuspec b/Tools/nuget/python.nuspec
new file mode 100644
index 0000000000..b3c5c3487a
--- /dev/null
+++ b/Tools/nuget/python.nuspec
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<package >
+ <metadata>
+ <id>python</id>
+ <title>Python</title>
+ <version>0.0.0.0</version>
+ <authors>Python Software Foundation</authors>
+ <licenseUrl>https://docs.python.org/3/license.html</licenseUrl>
+ <projectUrl>https://www.python.org/</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>Installs 64-bit Python for use in build scenarios.</description>
+ <iconUrl>https://www.python.org/static/favicon.ico</iconUrl>
+ <tags>python</tags>
+ </metadata>
+ <files>
+ <file src="**\*" target="tools" />
+ </files>
+</package>
diff --git a/Tools/nuget/pythonx86.nuspec b/Tools/nuget/pythonx86.nuspec
new file mode 100644
index 0000000000..b55c8799c0
--- /dev/null
+++ b/Tools/nuget/pythonx86.nuspec
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+<package >
+ <metadata>
+ <id>pythonx86</id>
+ <title>Python (32-bit)</title>
+ <authors>Python Software Foundation</authors>
+ <version>0.0.0.0</version>
+ <licenseUrl>https://docs.python.org/3/license.html</licenseUrl>
+ <projectUrl>https://www.python.org/</projectUrl>
+ <requireLicenseAcceptance>false</requireLicenseAcceptance>
+ <description>Installs 32-bit Python for use in build scenarios.</description>
+ <iconUrl>https://www.python.org/static/favicon.ico</iconUrl>
+ <tags>python</tags>
+ </metadata>
+ <files>
+ <file src="**\*" target="tools" />
+ </files>
+</package>