[PATCH 0/7] doc: tools: Tidy up toml files for a new release

This series corrects a few problems with the generation of pip packages which showed up during a recent tools release.
A new release has been completed for all tools with a new version number of 0.0.6 so this series reflects the changes there.
It also updates the documentation URL to use the u-boot.org domain.
Simon Glass (7): doc: Update documentation URL u_boot_pylib: Correct readme formatting tools: Keep test_util and patman test files in the pip release u_boot_pylib: Correct files used for pip release tools/make_pip: Add mention of u_boot_pylib in tool list patman: Update the run script tools: Move python tools to version 0.0.6
MAINTAINERS | 2 +- README | 2 +- doc/build/documentation.rst | 2 +- scripts/make_pip.sh | 14 ++++++++++++-- tools/binman/pyproject.toml | 6 +++--- tools/buildman/pyproject.toml | 6 +++--- tools/dtoc/pyproject.toml | 6 +++--- tools/patman/pyproject.toml | 8 ++++---- tools/u_boot_pylib/README.rst | 2 +- tools/u_boot_pylib/pyproject.toml | 9 ++++----- 10 files changed, 33 insertions(+), 24 deletions(-)

Update to use the new docs.u-boot.org URL for documentation.
Signed-off-by: Simon Glass sjg@chromium.org ---
MAINTAINERS | 2 +- README | 2 +- doc/build/documentation.rst | 2 +- tools/binman/pyproject.toml | 2 +- tools/buildman/pyproject.toml | 2 +- tools/dtoc/pyproject.toml | 2 +- tools/patman/pyproject.toml | 2 +- tools/u_boot_pylib/pyproject.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/MAINTAINERS b/MAINTAINERS index 7c1cb2dc4dc0..65f172ae433e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -976,7 +976,7 @@ EFI APP M: Simon Glass sjg@chromium.org M: Heinrich Schuchardt xypron.glpk@gmx.de S: Maintained -W: https://u-boot.readthedocs.io/en/latest/develop/uefi/u-boot_on_efi.html +W: https://docs.u-boot.org/en/latest/develop/uefi/u-boot_on_efi.html F: board/efi/efi-x86_app F: configs/efi-x86_app* F: doc/develop/uefi/u-boot_on_efi.rst diff --git a/README b/README index 60c6b8a19db1..e00b8e1799ba 100644 --- a/README +++ b/README @@ -2650,5 +2650,5 @@ Contributing
The U-Boot projects depends on contributions from the user community. If you want to participate, please, have a look at the 'General' -section of https://u-boot.readthedocs.io/en/latest/develop/index.html +section of https://docs.u-boot.org/en/latest/develop/index.html where we describe coding standards and the patch submission process. diff --git a/doc/build/documentation.rst b/doc/build/documentation.rst index 20b0fefa2d88..098c96a4c4ff 100644 --- a/doc/build/documentation.rst +++ b/doc/build/documentation.rst @@ -37,7 +37,7 @@ The *htmldocs* target is used to build the HTML documentation. It uses the # Display the documentation in a graphical web browser x-www-browser doc/output/index.html
-The HTML documentation is published at https://u-boot.readthedocs.io. The build +The HTML documentation is published at https://docs.u-boot.org. The build process for that site is controlled by the file *.readthedocs.yml*.
Infodoc documentation diff --git a/tools/binman/pyproject.toml b/tools/binman/pyproject.toml index b4b54fbaee61..c731c4b798c1 100644 --- a/tools/binman/pyproject.toml +++ b/tools/binman/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ]
[project.urls] -"Homepage" = "https://u-boot.readthedocs.io/en/latest/develop/package/index.html" +"Homepage" = "https://docs.u-boot.org/en/latest/develop/package/index.html" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[project.scripts] diff --git a/tools/buildman/pyproject.toml b/tools/buildman/pyproject.toml index 4d75e772ee18..90ad17620296 100644 --- a/tools/buildman/pyproject.toml +++ b/tools/buildman/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ]
[project.urls] -"Homepage" = "https://u-boot.readthedocs.io/en/latest/build/buildman.html" +"Homepage" = "https://docs.u-boot.org/en/latest/build/buildman.html" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[project.scripts] diff --git a/tools/dtoc/pyproject.toml b/tools/dtoc/pyproject.toml index 77fe4da2158f..1c5a2fb15151 100644 --- a/tools/dtoc/pyproject.toml +++ b/tools/dtoc/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ]
[project.urls] -"Homepage" = "https://u-boot.readthedocs.io/en/latest/develop/driver-model/of-plat.html" +"Homepage" = "https://docs.u-boot.org/en/latest/develop/driver-model/of-plat.html" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[project.scripts] diff --git a/tools/patman/pyproject.toml b/tools/patman/pyproject.toml index a54211f7069d..f29516acefad 100644 --- a/tools/patman/pyproject.toml +++ b/tools/patman/pyproject.toml @@ -19,7 +19,7 @@ classifiers = [ ]
[project.urls] -"Homepage" = "https://u-boot.readthedocs.io/en/latest/develop/patman.html" +"Homepage" = "https://docs.u-boot.org/en/latest/develop/patman.html" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[project.scripts] diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml index 037c5d629ec5..1984bd370089 100644 --- a/tools/u_boot_pylib/pyproject.toml +++ b/tools/u_boot_pylib/pyproject.toml @@ -18,7 +18,7 @@ classifiers = [ ]
[project.urls] -"Homepage" = "https://u-boot.readthedocs.io" +"Homepage" = "https://docs.u-boot.org" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[tool.setuptools.packages.find]

Update to use the new docs.u-boot.org URL for documentation.
Signed-off-by: Simon Glass sjg@chromium.org ---
MAINTAINERS | 2 +- README | 2 +- doc/build/documentation.rst | 2 +- tools/binman/pyproject.toml | 2 +- tools/buildman/pyproject.toml | 2 +- tools/dtoc/pyproject.toml | 2 +- tools/patman/pyproject.toml | 2 +- tools/u_boot_pylib/pyproject.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Applied to u-boot-dm/next, thanks!

Am 13. Dezember 2023 21:39:12 MEZ schrieb Simon Glass sjg@chromium.org:
Update to use the new docs.u-boot.org URL for documentation.
Who owns that domain? Can we let http://www.u-boot.org forward to https://docs.u-boot.org?
Best regards
Heinrich
Signed-off-by: Simon Glass sjg@chromium.org
MAINTAINERS | 2 +- README | 2 +- doc/build/documentation.rst | 2 +- tools/binman/pyproject.toml | 2 +- tools/buildman/pyproject.toml | 2 +- tools/dtoc/pyproject.toml | 2 +- tools/patman/pyproject.toml | 2 +- tools/u_boot_pylib/pyproject.toml | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-)
Applied to u-boot-dm/next, thanks!

Hi Heinrich,
On Thu, 14 Dec 2023 at 00:21, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
Am 13. Dezember 2023 21:39:12 MEZ schrieb Simon Glass sjg@chromium.org:
Update to use the new docs.u-boot.org URL for documentation.
Who owns that domain? Can we let http://www.u-boot.org forward to https://docs.u-boot.org?
I believe a website is in progress. Perhaps we should set a deadline to put something up by Christmas. If not, I can add a placeholder .
Regards, Simon

Correct a heading which is too short in the readme.
Fixes: 75554dfac29 ("patman: Add support for building a u_boot_tools...")
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/u_boot_pylib/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/u_boot_pylib/README.rst b/tools/u_boot_pylib/README.rst index 93858f5571da..36a18256d8b1 100644 --- a/tools/u_boot_pylib/README.rst +++ b/tools/u_boot_pylib/README.rst @@ -1,7 +1,7 @@ .. SPDX-License-Identifier: GPL-2.0+
# U-Boot Python Library -===================== +=======================
This is a Python library used by various U-Boot tools, including patman, buildman and binman.

Correct a heading which is too short in the readme.
Fixes: 75554dfac29 ("patman: Add support for building a u_boot_tools...")
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/u_boot_pylib/README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!

The test_util module is actually imported by some tools, e.g. binman so include it in the pip release.
The patman tool uses its test code when starting up, so keep that too.
Show a list of deleted files so it is clear what is happening.
Signed-off-by: Simon Glass sjg@chromium.org ---
scripts/make_pip.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 4602dcf61c88..25a4049271c9 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -29,6 +29,9 @@ repo="--repository testpypi" # Non-empty to do the actual upload upload=1
+# Non-empty to delete files used for testing +delete_testfiles=1 + tool="$1" shift flags="$*" @@ -58,6 +61,11 @@ if [ -n "${upload}" ]; then fi fi
+if [[ "${tool}" =~ ^(patman|u_boot_pylib)$ ]]; then + # Leave test_util.py and patman test files alone + delete_testfiles= +fi + # Create a temp dir to work in dir=$(mktemp -d)
@@ -91,7 +99,9 @@ find ${dest} -name __pycache__ -type f -exec rm {} ; find ${dest} -depth -name __pycache__ -exec rmdir 112 ;
# Remove test files -rm -rf ${dest}/*test* +if [ -n "${delete_testfiles}" ]; then + rm -rfv ${dest}/*test* +fi
mkdir ${dir}/tests cd ${dir}

The test_util module is actually imported by some tools, e.g. binman so include it in the pip release.
The patman tool uses its test code when starting up, so keep that too.
Show a list of deleted files so it is clear what is happening.
Signed-off-by: Simon Glass sjg@chromium.org ---
scripts/make_pip.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!

The files list is incorrect and dates from a time when the script was run from a different directory. Update it to match all the other tools.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/u_boot_pylib/pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml index 1984bd370089..a7a91e5cfa56 100644 --- a/tools/u_boot_pylib/pyproject.toml +++ b/tools/u_boot_pylib/pyproject.toml @@ -21,6 +21,5 @@ classifiers = [ "Homepage" = "https://docs.u-boot.org" "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
-[tool.setuptools.packages.find] -where = [".."] -include = ["u_boot_pylib*"] +[tool.setuptools.package-data] +u_boot_pylib = ["*.rst"]

The files list is incorrect and dates from a time when the script was run from a different directory. Update it to match all the other tools.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/u_boot_pylib/pyproject.toml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)
Applied to u-boot-dm/next, thanks!

This is not a tool but it is handled by the script, so update the help to include it.
Signed-off-by: Simon Glass sjg@chromium.org ---
scripts/make_pip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 25a4049271c9..d2639ffd6e43 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -39,7 +39,7 @@ flags="$*" if [[ "${tool}" =~ ^(patman|buildman|dtoc|binman|u_boot_pylib)$ ]]; then echo "Building dist package for tool ${tool}" else - echo "Unknown tool ${tool}: use patman, buildman, dtoc or binman" + echo "Unknown tool ${tool}: use u_boot_pylib, patman, buildman, dtoc or binman" exit 1 fi

This is not a tool but it is handled by the script, so update the help to include it.
Signed-off-by: Simon Glass sjg@chromium.org ---
scripts/make_pip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!

Patman now has its main program in a function, so update the toml file to match.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/patman/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/patman/pyproject.toml b/tools/patman/pyproject.toml index f29516acefad..56131947c794 100644 --- a/tools/patman/pyproject.toml +++ b/tools/patman/pyproject.toml @@ -23,7 +23,7 @@ classifiers = [ "Bug Tracker" = "https://source.denx.de/groups/u-boot/-/issues"
[project.scripts] -patman = "patman.__main__" +patman = "patman.__main__:run_patman"
[tool.setuptools.package-data] patman = ["*.rst"]

Patman now has its main program in a function, so update the toml file to match.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/patman/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to u-boot-dm/next, thanks!

A new release has been done with this version, so update it. Use the version numbers in dependencies also.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/binman/pyproject.toml | 4 ++-- tools/buildman/pyproject.toml | 4 ++-- tools/dtoc/pyproject.toml | 4 ++-- tools/patman/pyproject.toml | 4 ++-- tools/u_boot_pylib/pyproject.toml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/tools/binman/pyproject.toml b/tools/binman/pyproject.toml index c731c4b798c1..ba34437fc53a 100644 --- a/tools/binman/pyproject.toml +++ b/tools/binman/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project] name = "binary-manager" -version = "0.0.2" +version = "0.0.6" authors = [ { name="Simon Glass", email="sjg@chromium.org" }, ] -dependencies = ["pylibfdt", "u_boot_pylib", "dtoc"] +dependencies = ["pylibfdt", "u_boot_pylib >= 0.0.6", "dtoc >= 0.0.6"] description = "Binman firmware-packaging tool" readme = "README.rst" requires-python = ">=3.7" diff --git a/tools/buildman/pyproject.toml b/tools/buildman/pyproject.toml index 90ad17620296..fe0f6421b53f 100644 --- a/tools/buildman/pyproject.toml +++ b/tools/buildman/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project] name = "buildman" -version = "0.0.2" +version = "0.0.6" authors = [ { name="Simon Glass", email="sjg@chromium.org" }, ] -dependencies = ["u_boot_pylib", "patch-manager"] +dependencies = ["u_boot_pylib >= 0.0.6", "patch-manager >= 0.0.6"] description = "Buildman build tool for U-Boot" readme = "README.rst" requires-python = ">=3.7" diff --git a/tools/dtoc/pyproject.toml b/tools/dtoc/pyproject.toml index 1c5a2fb15151..9f59788e6163 100644 --- a/tools/dtoc/pyproject.toml +++ b/tools/dtoc/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project] name = "dtoc" -version = "0.0.2" +version = "0.0.6" authors = [ { name="Simon Glass", email="sjg@chromium.org" }, ] -dependencies = ["pylibfdt", "u_boot_pylib"] +dependencies = ["pylibfdt", "u_boot_pylib >= 0.0.6"] description = "Devicetree-to-C generator" readme = "README.rst" requires-python = ">=3.7" diff --git a/tools/patman/pyproject.toml b/tools/patman/pyproject.toml index 56131947c794..fcefcf669600 100644 --- a/tools/patman/pyproject.toml +++ b/tools/patman/pyproject.toml @@ -4,11 +4,11 @@ build-backend = "setuptools.build_meta"
[project] name = "patch-manager" -version = "0.0.2" +version = "0.0.6" authors = [ { name="Simon Glass", email="sjg@chromium.org" }, ] -dependencies = ["u_boot_pylib"] +dependencies = ["u_boot_pylib >= 0.0.6"] description = "Patman patch manager" readme = "README.rst" requires-python = ">=3.7" diff --git a/tools/u_boot_pylib/pyproject.toml b/tools/u_boot_pylib/pyproject.toml index a7a91e5cfa56..ce2355084ac7 100644 --- a/tools/u_boot_pylib/pyproject.toml +++ b/tools/u_boot_pylib/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project] name = "u_boot_pylib" -version = "0.0.2" +version = "0.0.6" authors = [ { name="Simon Glass", email="sjg@chromium.org" }, ]

A new release has been done with this version, so update it. Use the version numbers in dependencies also.
Signed-off-by: Simon Glass sjg@chromium.org ---
tools/binman/pyproject.toml | 4 ++-- tools/buildman/pyproject.toml | 4 ++-- tools/dtoc/pyproject.toml | 4 ++-- tools/patman/pyproject.toml | 4 ++-- tools/u_boot_pylib/pyproject.toml | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-)
Applied to u-boot-dm/next, thanks!
participants (2)
-
Heinrich Schuchardt
-
Simon Glass