diff options
author | Matthew Carlson <matthewfcarlson@gmail.com> | 2021-02-09 08:50:33 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-02-09 03:56:37 +0000 |
commit | 1534b6228b0932d745bf6ec9fd4cb010800b92f2 (patch) | |
tree | 72fff77178550a5f65df459f1b639a09efa499f9 /BaseTools/BuildEnv | |
parent | ecc267fec55aecd9e36bf80caba732d5121a3428 (diff) | |
download | edk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.tar.gz edk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.tar.bz2 edk2-1534b6228b0932d745bf6ec9fd4cb010800b92f2.zip |
BaseTools: Use pip module if available, CI uses it by default
Use the new edk2-basetools pip module.
Includes a helpful message in setup to let users know which has been
selected.
Cc: Bob Feng <bob.c.feng@intel.com>
Cc: Liming Gao <gaoliming@byosoft.com.cn>
Cc: Yuwei Chen <yuwei.chen@intel.com>
Reviewed-by: Bob Feng <bob.c.feng@intel.com>
Reviewed-by: Yuwei <Chen<yuwei.chen@intel.com>
Signed-off-by: Matthew Carlson <matthewfcarlson@gmail.com>
Diffstat (limited to 'BaseTools/BuildEnv')
-rwxr-xr-x | BaseTools/BuildEnv | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/BaseTools/BuildEnv b/BaseTools/BuildEnv index 5943bb9ef9..8d283e10c0 100755 --- a/BaseTools/BuildEnv +++ b/BaseTools/BuildEnv @@ -46,7 +46,7 @@ RestorePreviousConfiguration() { done fi fi - +
PREVIOUS_CONF_FILE=$CONF_PATH/BuildEnv.sh if [ -e $PREVIOUS_CONF_FILE ] then @@ -198,7 +198,17 @@ AddEdkToolsToPath() { EDK_TOOLS_PATH_BIN=`GetEdkToolsPathBinDirectory` - AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike + # check if the edk2basetools pip package is available
+ if $PYTHON_COMMAND -c "import edk2basetools" &> /dev/null; then
+ # if it is, use the pip version of the wrappers
+ echo "Using Pip Basetools"
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinPipWrappers/PosixLike
+ else
+ echo "Using EDK2 in-source Basetools"
+ AddDirToStartOfPath $EDK_TOOLS_PATH/BinWrappers/PosixLike
+ fi
+
+
AddDirToStartOfPath $EDK_TOOLS_PATH_BIN } |