[PATCH 1/2] test/py/requirements.txt: add setuptools
Marek Vasut
marek.vasut at mailbox.org
Fri Nov 21 17:59:10 CET 2025
On 11/21/25 5:48 PM, Tom Rini wrote:
> On Fri, Nov 21, 2025 at 09:56:59AM -0600, David Lechner wrote:
>> On 11/21/25 8:39 AM, Tom Rini wrote:
>>> On Fri, Nov 21, 2025 at 08:36:14AM -0600, David Lechner wrote:
>>>> Add setuptools to test/py/requirements.txt. Otherwise, attempting to run
>>>> tests can fail as follows:
>>>>
>>>> $ ./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: David Lechner <dlechner at baylibre.com>
>>>> ---
>>>> test/py/requirements.txt | 1 +
>>>> 1 file changed, 1 insertion(+)
>>>
>>> NAK. It's the build of U-Boot that requires setuptools (specifically
>>> scripts/dtc/pylibfdt), not pytest. It was dropped as part of cleaning up
>>> the test/py/requirements.txt file before. A top-level project
>>> requirements.txt file would help avoid these problems, but we don't yet
>>> have agreement on that.
>>>
>>
>> OK, I think I see how it works now. It looks like most tools have
>> a requirements.txt already, but dtc is missing it. Would it make
>> sense to add a scripts/dtc/pylibfdt/requirements.txt containing
>> setuptools?
>>
>> Then `find . -name *requirements*.txt` would make it easy to find
>> everything that might need to be installed for a given target.
>
> Yes, I think that's a reasonable step. I think in the near'ish future we
> might be able to instead switch to just installing pylibfdt.
I'll just say, I understand that adding those setuptools into
test/py/requirements.txt is not the right fix, but it does make me
grumpy every single time I use pytest with U-Boot. So I do fully support
this effort to improve this situation.
More information about the U-Boot
mailing list