Use the identified python when building System.Private.CoreLib (dotnet/coreclr#19043)
authorOmair Majid <omajid@redhat.com>
Wed, 1 Aug 2018 16:02:53 +0000 (12:02 -0400)
committerJan Kotas <jkotas@microsoft.com>
Wed, 1 Aug 2018 16:02:53 +0000 (09:02 -0700)
build.sh and build.cmd contain logic to identify a working version of
python to use. System.Private.CoreLib ignores that and directly invokes
'python', which may not work, or even execute a different program.

Commit migrated from https://github.com/dotnet/coreclr/commit/5164e76ce01fc36833a7f5e6fb7b1ec2f55c2262

src/coreclr/build.sh
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj

index 091d622..4002f27 100755 (executable)
@@ -22,6 +22,8 @@ then
    exit 1
 fi
 
+export PYTHON
+
 usage()
 {
     echo "Usage: $0 [BuildArch] [BuildType] [-verbose] [-coverage] [-cross] [-clangx.y] [-ninja] [-configureonly] [-skipconfigure] [-skipnative] [-skipmscorlib] [-skiptests] [-stripsymbols] [-ignorewarnings] [-cmakeargs] [-bindir]"
index 9a2fc68..0a02d3c 100644 (file)
     <PropertyGroup>
       <CMakeDefinitionSaveFile>$(IntermediateOutputPath)..\cmake.definitions</CMakeDefinitionSaveFile>
     </PropertyGroup>
-    <Exec Command="python $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
+    <Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
   </Target>
   <PropertyGroup Condition="'$(BuildOS)' == 'Windows_NT'">
     <EnableDotnetAnalyzers Condition="'$(EnableDotnetAnalyzers)'==''">true</EnableDotnetAnalyzers>