test/py: Re-add setuptools to requirements.txt
PATCH 1/1 test/py: Re-add setuptools to requirements.txt
The commit 859621b47f9e ("python: Recreate test/py and tools/buildman requirements.txt files") recreated the python requirements but dropped the setuptools module that is used by the test harness.
This leads to the following error when trying to run a test:
pytest --build --bd sandbox test/py/tests/test_net.py
+make O=/home/javier/devel/u-boot/build-sandbox -s sandbox_defconfig
+make O=/home/javier/devel/u-boot/build-sandbox -s -j8
Traceback (most recent call last):
File "/home/javier/devel/u-boot/build-sandbox/../scripts/dtc/pylibfdt/setup.py", line 23, in <module>
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
make[3]: *** [../scripts/dtc/pylibfdt/Makefile:33: rebuild] Error 1
make[2]: *** [../scripts/Makefile.build:398: scripts/dtc/pylibfdt] Error 2
make[1]: *** [/home/javier/devel/u-boot/Makefile:2079: scripts_dtc] Error 2
make: *** [Makefile:177: sub-make] Error 2
Exit code: 2
---
test/py/requirements.txt | 1 + 1 file changed, 1 insertion(+)
test/py/requirements.txt +1 -0
@@ -3,3 +3,4 @@ pycryptodomex==3.21.0 pytest==6.2.5 pytest-xdist==2.5.0 FATtools==1.0.42 +setuptools==75.8.0
Signature · 4 lines
2.49.0 base-commit: c5afa1fef49f55146e78d6157470520391c40eca branch: fix-test
Quoted 19 lines · Javier Martinez Canillas
The commit
859621b47f9e("python: Recreate test/py andtools/buildmanrequirements.txt files") recreated the python requirements but dropped the setuptools module that is used by the test harness.This leads to the following error when trying to run a test:
pytest --build --bd sandbox
test/py/tests/test_net.py
+make O=/home/javier/devel/u-boot/build-sandbox -ssandbox_defconfig
+make O=/home/javier/devel/u-boot/build-sandbox -s -j8
Traceback (most recent call last):
File "/home/javier/devel/u-boot/build-sandbox/../scripts/dtc/pylibfdt/setup.py", line 23, in <module>
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
make[3]: *** [../scripts/dtc/pylibfdt/Makefile:33: rebuild] Error 1
make[2]: *** [../scripts/Makefile.build:398:scripts/dtc/pylibfdt] Error 2
make[1]: *** [/home/javier/devel/u-boot/Makefile:2079:scripts_dtc] Error 2
make: *** [Makefile:177: sub-make] Error 2
Exit code: 2
Quoted 2 lines
Fixes 859621b47f9e ("python: Recreate test/py and tools/buildman requirements.txt files")Signed-off-by Javier Martinez Canillas <[email protected]>
It's not pytest that requires setup tools, it's pylibfdt. You're not able to build sandbox, is the problem. And that's a documented requirement for building U-Boot in general for a number of platforms. This doesn't belong in test/py/requirements.txt which is why the "make a requirements.txt" tooling drops it.
Signature · 1 line
Tom
Tom Rini <[email protected]> writes:
Hello Tom,
Quoted 21 lines · Javier Martinez Canillas
Quoted 20 lines
The commit
859621b47f9e("python: Recreate test/py andtools/buildmanrequirements.txt files") recreated the python requirements but dropped the setuptools module that is used by the test harness.This leads to the following error when trying to run a test:
pytest --build --bd sandbox
test/py/tests/test_net.py
+make O=/home/javier/devel/u-boot/build-sandbox -ssandbox_defconfig
+make O=/home/javier/devel/u-boot/build-sandbox -s -j8
Traceback (most recent call last):
File "/home/javier/devel/u-boot/build-sandbox/../scripts/dtc/pylibfdt/setup.py", line 23, in <module>
from setuptools import setup, Extension
ModuleNotFoundError: No module named 'setuptools'
make[3]: *** [../scripts/dtc/pylibfdt/Makefile:33: rebuild] Error 1
make[2]: *** [../scripts/Makefile.build:398:scripts/dtc/pylibfdt] Error 2
make[1]: *** [/home/javier/devel/u-boot/Makefile:2079:scripts_dtc] Error 2
make: *** [Makefile:177: sub-make] Error 2
Exit code: 2
Quoted 9 lines
Quoted 2 lines
Fixes 859621b47f9e ("python: Recreate test/py and tools/buildman requirements.txt files")Signed-off-by Javier Martinez Canillas <[email protected]>It's not pytest that requires setup tools, it's pylibfdt. You're not able to build sandbox, is the problem. And that's a documented requirement for building U-Boot in general for a number of platforms. This doesn't belong in
test/py/requirements.txtwhich is why the "make a requirements.txt" tooling drops it.
Got it. Sorry for the noise then.
Signature · 5 lines
Best regards, Javier Martinez Canillas Core Platforms Red Hat