Skip to content

Commit b1dbbd3

Browse files
stinospfalcon
authored andcommitted
windows: Allow specifying the python executable to use for msvc builds
This defaults to 'python' but can be now overridden if needed
1 parent 1b9d161 commit b1dbbd3

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

windows/msvc/genhdr.targets

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<PropertyGroup>
1111
<DestDir>$(PyBuildDir)genhdr\</DestDir>
1212
<PySrcDir>$(PyBaseDir)py\</PySrcDir>
13+
<PyPython Condition="'$(PyPython)' == ''">python</PyPython>
1314
</PropertyGroup>
1415

1516
<Target Name="MakeDestDir">
@@ -27,7 +28,7 @@
2728
<PyIncDirs Include="$(PyIncDirs)"/>
2829
</ItemGroup>
2930
<Exec Command="cl /nologo /I@(PyIncDirs, ' /I') /Fi$(PreProc) /P $(PySrcDir)qstrdefs.h"/>
30-
<Exec Command="python $(PySrcDir)makeqstrdata.py $(PreProc) $(QstrDefs) > $(TmpFile)"/>
31+
<Exec Command="$(PyPython) $(PySrcDir)makeqstrdata.py $(PreProc) $(QstrDefs) > $(TmpFile)"/>
3132
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="CopyFileIfDifferent" Properties="SourceFile=$(TmpFile);DestFile=$(DestFile)"/>
3233
</Target>
3334

@@ -36,7 +37,7 @@
3637
<DestFile>$(DestDir)mpversion.h</DestFile>
3738
<TmpFile>$(DestFile).tmp</TmpFile>
3839
</PropertyGroup>
39-
<Exec Command="python $(PySrcDir)makeversionhdr.py $(TmpFile)"/>
40+
<Exec Command="$(PyPython) $(PySrcDir)makeversionhdr.py $(TmpFile)"/>
4041
<MSBuild Projects="$(MSBuildThisFileFullPath)" Targets="CopyFileIfDifferent" Properties="SourceFile=$(TmpFile);DestFile=$(DestFile)"/>
4142
</Target>
4243

0 commit comments

Comments
 (0)