diff options
author | Mattijs Korpershoek <mkorpershoek@kernel.org> | 2025-04-16 14:36:28 +0200 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2025-04-24 16:30:37 -0600 |
commit | 9d3f1ebaf8751f0287b5d02158cc706435f8fb19 (patch) | |
tree | ec80c42ff2b9ac955f088b5ffb3558a6106214b6 | |
parent | 1c2979af36be4275135671dbc69d1f86576a6c76 (diff) |
tools/make_pip: Use venv when invoking pip
Recent Ubuntu versions (24.04+) disallow pip by default when
installing packages. The recommended approach is to use a virtual
environment (venv) instead.
Because of this, "make pip" is failing on such versions.
To prepare CI container migration to Ubuntu 24.04, use a venv in the
make_pip script.
Note: This has been reported on [1]
[1] https://source.denx.de/u-boot/custodians/u-boot-dm/-/issues/37
Signed-off-by: Mattijs Korpershoek <mkorpershoek@kernel.org>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
-rwxr-xr-x | scripts/make_pip.sh | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index d2639ffd6e4..33ad51ada70 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -106,6 +106,10 @@ fi mkdir ${dir}/tests cd ${dir} +# Use virtual environment +python3 -m venv .venv +source .venv/bin/activate + # Make sure the tools are up to date python3 -m pip install --upgrade build python3 -m pip install --upgrade twine @@ -122,6 +126,8 @@ if [ -n "${upload}" ]; then echo "Completed upload of ${tool}" fi +# Finish using virtual environment +deactivate rm -rf "${dir}" echo -e "done\n\n" |