Skip to contentSkip to conversation

python: Add a top-level requirements.txt file

PATCH In review Tom Rini 2 participants 3 messages Oct 23, 2025

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 python: Add a top-level requirements.txt file

A frequently reported problem is that someone misses a required python package when doing a specific task within U-Boot. This is in turn because each of our requirements.txt files only lists their direct dependencies. It is not always clear that another tool has its own requirements and thus something else fails. Solve this by having a top level requirements.txt file for the project which in turn installs all of our other project requirements.txt files.

---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Kory Maincent <[email protected]>

As Kory is the most recent person to hit this, cc'ing them. I think this is the right path forward and if agreed, I'll update documentation in a follow-up.

---
 requirements.txt | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 requirements.txt
requirements.txt new file +8 -0
new file mode 100644
index 000000000000..0fd08b9da17b
@@ -0,0 +1,8 @@
+# For ease of use, this is all requirements files for all portions
+# of U-Boot
+-r doc/sphinx/requirements.txt
+-r tools/u_boot_pylib/requirements.txt
+-r tools/buildman/requirements.txt
+-r tools/binman/requirements.txt
+-r tools/patman/requirements.txt
+-r test/py/requirements.txt
Signature · 1 line
2.43.0
#1 lore raw

Am 23. Oktober 2025 18:40:59 GMT+01:00 schrieb Tom Rini <[email protected]>:

Quoted 28 lines

A frequently reported problem is that someone misses a required python package when doing a specific task within U-Boot. This is in turn because each of our requirements.txt files only lists their direct dependencies. It is not always clear that another tool has its own requirements and thus something else fails. Solve this by having a top level requirements.txt file for the project which in turn installs all of our other project requirements.txt files.

---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Kory Maincent <[email protected]>

As Kory is the most recent person to hit this, cc'ing them. I think this is the right path forward and if agreed, I'll update documentation in a follow-up.
---
requirements.txt | 8 ++++++++

1 file changed, 8 insertions(+)

create mode 100644 requirements.txt

requirements.txt new file +0 -0
new file mode 100644
index 000000000000..0fd08b9da17b

requirements.txt line 8

Quoted 8 lines
requirements.txt new file +8 -0
@@ -0,0 +1,8 @@
+# For ease of use, this is all requirements files for all portions
+# of U-Boot
+-r doc/sphinx/requirements.txt
+-r tools/u_boot_pylib/requirements.txt
+-r tools/buildman/requirements.txt
+-r tools/binman/requirements.txt
+-r tools/patman/requirements.txt
+-r test/py/requirements.txt

These individual files may require different versions of the same package.

Either the individual files should be feature complete for each CI step, or we should move to a single requirements file.

Best regards

Heinrich

author
#2 lore raw
Quoted 23 lines · Heinrich Schuchardt

Am 23. Oktober 2025 18:40:59 GMT+01:00 schrieb Tom Rini <[email protected]>:

Quoted 22 lines

A frequently reported problem is that someone misses a required python package when doing a specific task within U-Boot. This is in turn because each of our requirements.txt files only lists their direct dependencies. It is not always clear that another tool has its own requirements and thus something else fails. Solve this by having a top level requirements.txt file for the project which in turn installs all of our other project requirements.txt files.

---
Cc: Heinrich Schuchardt <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Kory Maincent <[email protected]>

As Kory is the most recent person to hit this, cc'ing them. I think this is the right path forward and if agreed, I'll update documentation in a follow-up.
---
requirements.txt | 8 ++++++++

1 file changed, 8 insertions(+)

create mode 100644 requirements.txt

Quoted 16 lines
Quoted 6 lines
requirements.txt new file +0 -0
new file mode 100644
index 000000000000..0fd08b9da17b

requirements.txt line 8

Quoted 8 lines
requirements.txt new file +8 -0
@@ -0,0 +1,8 @@
+# For ease of use, this is all requirements files for all portions
+# of U-Boot
+-r doc/sphinx/requirements.txt
+-r tools/u_boot_pylib/requirements.txt
+-r tools/buildman/requirements.txt
+-r tools/binman/requirements.txt
+-r tools/patman/requirements.txt
+-r test/py/requirements.txt

These individual files may require different versions of the same package.

They may not, that would break creating our containers for CI.

Quoted 2 lines

Either the individual files should be feature complete for each CI step, or we should move to a single requirements file.

This would be even further against python best practices than we already have been.

Signature · 1 line
Tom