Since GenFds.py and build.py import modules from its own directory, add "-m" to the python parameters so that they can import its own modules.
Contributed-under: TianoCore Contribution Agreement 1.1 Cc: Yonghong Zhu <yonghong....@intel.com> Cc: Liming Gao <liming....@intel.com> Signed-off-by: Gary Lin <g...@suse.com> --- BaseTools/BinWrappers/PosixLike/GenFds | 2 +- BaseTools/BinWrappers/PosixLike/build | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BaseTools/BinWrappers/PosixLike/GenFds b/BaseTools/BinWrappers/PosixLike/GenFds index 214d88fff1b1..ba45303dee74 100755 --- a/BaseTools/BinWrappers/PosixLike/GenFds +++ b/BaseTools/BinWrappers/PosixLike/GenFds @@ -11,4 +11,4 @@ dir=$(dirname "$full_cmd") cmd=${full_cmd##*/} export PYTHONPATH="$dir/../../Source/Python" -exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@" +exec "${python_exe:-python}" -m $cmd.$cmd "$@" diff --git a/BaseTools/BinWrappers/PosixLike/build b/BaseTools/BinWrappers/PosixLike/build index 214d88fff1b1..ba45303dee74 100755 --- a/BaseTools/BinWrappers/PosixLike/build +++ b/BaseTools/BinWrappers/PosixLike/build @@ -11,4 +11,4 @@ dir=$(dirname "$full_cmd") cmd=${full_cmd##*/} export PYTHONPATH="$dir/../../Source/Python" -exec "${python_exe:-python}" "$dir/../../Source/Python/$cmd/$cmd.py" "$@" +exec "${python_exe:-python}" -m $cmd.$cmd "$@" -- 2.16.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel