Skip to content

Commit

Permalink
Allow specifying the python interpreted in PYTHON
Browse files Browse the repository at this point in the history
  • Loading branch information
citrus-it committed May 8, 2021
1 parent 0e0f840 commit ca932ed
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/BPDG
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/Ecc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/GenDepex
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/usr/bin/env bash
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/AutoGen/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/AutoGen/`basename $0`.py $*
2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/GenFds
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/GenPatchPcdTable
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/PatchPcdValue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/TargetTool
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/Trim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/UPT
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/BinWrappers/PosixLike/build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env bash
#python `dirname $0`/RunToolFromSource.py `basename $0` $*
PYTHONPATH="`dirname $0`/../../Source/Python" \
python "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*
${PYTHON:-python} "`dirname $0`/../../Source/Python"/`basename $0`/`basename $0`.py $*

2 changes: 1 addition & 1 deletion BaseTools/Tests/GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
all: test

test:
@python RunTests.py
@$(PYTHON) RunTests.py

clean:
find . -name '*.pyc' -exec rm '{}' ';'
Expand Down
4 changes: 4 additions & 0 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ shift
: "${GAR:=/usr/bin/gar}"
: "${GLD:=/usr/bin/gld}"
: "${GOBJCOPY:=/usr/bin/gobjcopy}"
: "${PYTHON:=/usr/bin/python}"

export PYTHON

MAKE_ARGS="
AS=$GAS
Expand All @@ -44,6 +47,7 @@ MAKE_ARGS="
CC=$GCC BUILD_CC=$GCC
CXX=$GXX BUILD_CXX=$GXX
GCCPATH=$GCCPATH
PYTHON=$PYTHON
"

ILLGCC_BIN=$GCCPATH/bin/
Expand Down

0 comments on commit ca932ed

Please sign in to comment.