]> granicus.if.org Git - python/commitdiff
Preinstalls pip into the nuget package so that pip.exe is available after installation.
authorSteve Dower <steve.dower@microsoft.com>
Fri, 24 Jun 2016 18:37:50 +0000 (11:37 -0700)
committerSteve Dower <steve.dower@microsoft.com>
Fri, 24 Jun 2016 18:37:50 +0000 (11:37 -0700)
Tools/nuget/make_pkg.proj

index 812349a43feffe31a5cdbc056349760fcfb26001..15e6d8f38915ab60bd8cc51051f195801110dcd2 100644 (file)
@@ -24,6 +24,8 @@
         <PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
         <PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
         
+        <PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append('$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
+        
         <NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>
         <NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>
         <NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath)\en-us"</NugetArguments>
@@ -40,9 +42,10 @@ set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.
     </Target>
 
     <Target Name="_Build">
+        <Exec Command="$(CleanCommand)" />
         <Exec Command="$(Environment)
-$(CleanCommand)
 $(PythonArguments)" />
+        <Exec Command="$(PipArguments)" />
         <Exec Command="$(NugetArguments)" />
     </Target>