Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Adds Python var and defaults to python (#28102)
Browse files Browse the repository at this point in the history
Co-authored-by: Silvio Guiso <v-siguis@microsoft.com>
  • Loading branch information
silvioguiso and Silvio Guiso authored Sep 21, 2020
1 parent c89c7c7 commit 70cf9ff
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/mscorlib/System.Private.CoreLib.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@
<!-- Compiler Definition Verification -->
<PropertyGroup>
<CMakeDefinitionSaveFile>$(IntermediateOutputPath)..\cmake.definitions</CMakeDefinitionSaveFile>
<PYTHON Condition=" '$(PYTHON)' == '' ">python</PYTHON>
</PropertyGroup>
<Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
</Target>
Expand Down Expand Up @@ -670,4 +671,4 @@
</ItemGroup>
<Import Project="ILLink.targets" />
<Import Project="GenerateCompilerResponseFile.targets" />
</Project>
</Project>
19 changes: 19 additions & 0 deletions sync.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
#!/usr/bin/env bash

# resolve python-version to use
if [ "$PYTHON" == "" ] ; then
if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python || command -v python3)
then
echo "Unable to locate build-dependency python!" 1>&2
exit 1
fi
fi

# validate python-dependency
# useful in case of explicitly set option.
if ! command -v $PYTHON > /dev/null
then
echo "Unable to locate build-dependency python ($PYTHON)!" 1>&2
exit 1
fi

export PYTHON

usage()
{
echo "Usage: sync [-p]"
Expand Down

0 comments on commit 70cf9ff

Please sign in to comment.