[PATCH] test: Add setuptools to test requirements.txt

Javier Tia javier.tia at linaro.org
Mon May 5 23:14:13 CEST 2025


Hi Tom,

On Mon, May 5, 2025, at 3:08 PM, Tom Rini wrote:
> On Mon, May 05, 2025 at 02:50:51PM -0600, Javier Tia wrote:
>
>> It solves the following error:
>> 
>> ❯ ./test/py/test.py --bd sandbox --build
>> +make O=/u-boot/build-sandbox -s sandbox_defconfig
>> +make O=/u-boot/build-sandbox -s -j32
>> Traceback (most recent call last):
>>   File "/u-boot/build-sandbox/../scripts/dtc/pylibfdt/setup.py", line 23, in <module>
>>     from setuptools import setup, Extension
>> ModuleNotFoundError: No module named 'setuptools
>> 
>> Signed-off-by: Javier Tia <javier.tia at linaro.org>
>> ---
>>  test/py/requirements.txt | 1 +
>>  1 file changed, 1 insertion(+)
>
> This is the wrong place. You can't build U-Boot without
> python3-setuptools being available, so it's part of the implicit or
> explicit dependencies in doc/build/gcc.rst. I believe for Ubuntu/etc
> it's implicit but should likely be explicit.

What about the use case where you just want to run the U-Boot CI tests?

I found this problem just following the documentation at https://docs.u-boot.org/en/latest/develop/py_testing.html.

$ cd /path/to/u-boot
$ python3 -m venv venv
$ . ./venv/bin/activate
$ pip install -r test/py/requirements.txt
$ make mrproper
$ ./test/py/test.py --bd sandbox --build

-- 
» Javier Tia ✍


More information about the U-Boot mailing list