BaseTools: Use PYTHON3 variable instead of PYTHON_HOME

Use PYTHON3 variable instead of PYTHON_HOME path

Cc: Liming Gao <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Yunhua Feng <yunhuax.feng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
Yunhua Feng 2018-09-25 12:25:30 +08:00 committed by Yonghong Zhu
parent 04c47cd401
commit d25c096d27
6 changed files with 18 additions and 18 deletions

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here

View File

@ -1,9 +1,9 @@
#!/usr/bin/env bash #!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $* #python `dirname $0`/RunToolFromSource.py `basename $0` $*
# If a python2 command is available, use it in preference to python # If a $PYTHON3 command is available, use it in preference to python
if command -v python2 >/dev/null 2>&1; then if command -v $PYTHON3 >/dev/null 2>&1; then
python_exe=python2 python_exe=$PYTHON3
fi fi
full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a discussion of why $0 is not a good choice here