[PATCH] tools/make_pip: Use virtualenv when invoking pip

Tom Rini trini at konsulko.com
Tue Apr 15 19:59:44 CEST 2025


On Wed, Apr 09, 2025 at 09:46:34AM +0200, Mattijs Korpershoek wrote:

> Recent Ubuntu versions (24.04+) disallow pip by default when
> installing packages. The recommended approach is to use a virtualenv
> instead.
> Because of this, "make pip" is failing on such versions.
> 
> To prepare CI container migration to Ubuntu 24.04, use a virtualenv
> 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 at kernel.org>
> Reviewed-by: Tom Rini <trini at konsulko.com>
> ---
> This has been tested in docker on ubuntu:24.04 after running:
> $ apt install python3 python3-virtualenv
> 
> with:
> $ ./scripts/make_pip.sh u_boot_pylib "-n"
> 
> And shows:
> Successfully built u_boot_pylib-0.0.6.tar.gz and u_boot_pylib-0.0.6-py3-none-any.whl
> 
> Also tested with "$ make pip".
> ---
>  scripts/make_pip.sh | 6 ++++++
>  1 file changed, 6 insertions(+)

So, this ends up failing with Ubuntu 22.04 thusly:
https://source.denx.de/u-boot/u-boot/-/jobs/1103567

And in short, I think your original plan to use venv not virtualenv is
correct, sorry for the noise. I'll post something to install
python3-venv to our container shortly and switch to venv not virtualenv
as that seems to be the long term best answer.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250415/df851495/attachment.sig>


More information about the U-Boot mailing list