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

Commit 70cf9ff

Browse files
silvioguisoSilvio Guiso
andauthored
Adds Python var and defaults to python (#28102)
Co-authored-by: Silvio Guiso <[email protected]>
1 parent c89c7c7 commit 70cf9ff

File tree

2 files changed

+21
-1
lines changed

2 files changed

+21
-1
lines changed

src/mscorlib/System.Private.CoreLib.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,6 +639,7 @@
639639
<!-- Compiler Definition Verification -->
640640
<PropertyGroup>
641641
<CMakeDefinitionSaveFile>$(IntermediateOutputPath)..\cmake.definitions</CMakeDefinitionSaveFile>
642+
<PYTHON Condition=" '$(PYTHON)' == '' ">python</PYTHON>
642643
</PropertyGroup>
643644
<Exec Command="&quot;$(PYTHON)&quot; $(MSBuildThisFileDirectory)..\scripts\check-definitions.py &quot;$(CMakeDefinitionSaveFile)&quot; &quot;$(DefineConstants)&quot; &quot;$(IgnoreDefineConstants)&quot; " />
644645
</Target>
@@ -670,4 +671,4 @@
670671
</ItemGroup>
671672
<Import Project="ILLink.targets" />
672673
<Import Project="GenerateCompilerResponseFile.targets" />
673-
</Project>
674+
</Project>

sync.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#!/usr/bin/env bash
22

3+
# resolve python-version to use
4+
if [ "$PYTHON" == "" ] ; then
5+
if ! PYTHON=$(command -v python2.7 || command -v python2 || command -v python || command -v python3)
6+
then
7+
echo "Unable to locate build-dependency python!" 1>&2
8+
exit 1
9+
fi
10+
fi
11+
12+
# validate python-dependency
13+
# useful in case of explicitly set option.
14+
if ! command -v $PYTHON > /dev/null
15+
then
16+
echo "Unable to locate build-dependency python ($PYTHON)!" 1>&2
17+
exit 1
18+
fi
19+
20+
export PYTHON
21+
322
usage()
423
{
524
echo "Usage: sync [-p]"

0 commit comments

Comments
 (0)