mirror of https://github.com/acidanthera/audk.git
BaseTools/PosixLike: honor pre-set PYTHONPATH
Utilities written in Python may depend on external (preinstalled) Python packages; for example, Ecc depends on "antlr_python_runtime-3.0.1". Such packages need not be installed system-wide, as long as they are reachable through PYTHONPATH. Therefore we shouldn't overwrite the user's PYTHONPATH with "BaseTools/Source/Python"; instead, we should prepend the latter to the former. Cc: Liming Gao <liming.gao@intel.com> Cc: Yonghong Zhu <yonghong.zhu@intel.com> Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=896 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Laszlo Ersek <lersek@redhat.com> Reviewed-by: Liming Gao <liming.gao@intel.com>
This commit is contained in:
parent
28892d768b
commit
b12b2c74a3
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/AutoGen/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/Rsa2048Sha256Sign/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
exe=$(basename "$full_cmd")
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$exe/$exe.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
|
@ -10,5 +10,5 @@ full_cmd=${BASH_SOURCE:-$0} # see http://mywiki.wooledge.org/BashFAQ/028 for a d
|
|||
dir=$(dirname "$full_cmd")
|
||||
cmd=${full_cmd##*/}
|
||||
|
||||
export PYTHONPATH="$dir/../../Source/Python"
|
||||
export PYTHONPATH="$dir/../../Source/Python${PYTHONPATH:+:"$PYTHONPATH"}"
|
||||
exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@"
|
||||
|
|
Loading…
Reference in New Issue