Skip to content

Commit 3f9fbfc

Browse files
committed
Preinstalls pip into the nuget package so that pip.exe is available after installation.
1 parent 33f7310 commit 3f9fbfc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Tools/nuget/make_pkg.proj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
<PythonArguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\..\msi\make_zip.py"</PythonArguments>
2525
<PythonArguments>$(PythonArguments) -t "$(IntermediateOutputPath)" -a $(ArchName)</PythonArguments>
2626

27+
<PipArguments>"$(IntermediateOutputPath)\python.exe" -B -c "import sys; sys.path.append('$(PySourcePath)\Lib'); import ensurepip; ensurepip._main()"</PipArguments>
28+
2729
<NugetArguments>"$(Nuget)" pack "$(MSBuildThisFileDirectory)\$(OutputName).nuspec"</NugetArguments>
2830
<NugetArguments>$(NugetArguments) -BasePath "$(IntermediateOutputPath)"</NugetArguments>
2931
<NugetArguments>$(NugetArguments) -OutputDirectory "$(OutputPath)\en-us"</NugetArguments>
@@ -40,9 +42,10 @@ set VCREDIST_PATH=$(VS140COMNTOOLS)\..\..\VC\redist\$(Platform)\Microsoft.VC140.
4042
</Target>
4143

4244
<Target Name="_Build">
45+
<Exec Command="$(CleanCommand)" />
4346
<Exec Command="$(Environment)
44-
$(CleanCommand)
4547
$(PythonArguments)" />
48+
<Exec Command="$(PipArguments)" />
4649
<Exec Command="$(NugetArguments)" />
4750
</Target>
4851

0 commit comments

Comments
 (0)