From: Christopher Obbard Date: Mon, 6 Apr 2026 00:46:57 +0100 Subject: Add pyproject.toml pybuild defaults to the distutils plugin which requires setup.py. Add a minimal pyproject.toml using the setuptools backend. The mbn package is discovered via namespace package find and the top-level scripts are installed as script-files. Also remove the now useless requirements.txt file and update the README to use the new method of installation. Signed-off-by: Christopher Obbard Forwarded: https://github.com/msm8916-mainline/qtestsign/pull/8 Last-Update: 2026-07-07 --- README.md | 5 ++++- pyproject.toml | 18 ++++++++++++++++++ requirements.txt | 1 - 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt diff --git a/README.md b/README.md index 31a3683..10291b2 100644 --- a/README.md +++ b/README.md @@ -22,9 +22,12 @@ On many distributions this will likely be already installed by default (but perh Alternatively you can install it with pip: ``` -$ pip install -r requirements.txt +$ pip install . ``` +If you are developing or modifying the tool, use `pip install -e .` instead so your code changes take effect immediately. + + Then, just use `./qtestsign.py --help` to figure out how the tool works. You need to specify the firmware type and the ELF image to sign, e.g. for [U-Boot]: diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..be73a28 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,18 @@ +[build-system] +requires = ["setuptools"] +build-backend = "setuptools.build_meta" + +[project] +name = "qtestsign" +version = "0.0" +requires-python = ">=3.7" +dependencies = [ + "cryptography>=3.1", +] + +[tool.setuptools.packages.find] +namespaces = true +include = ["mbn"] + +[tool.setuptools] +script-files = ["qtestsign.py", "merge.py", "patchxbl.py", "strip.py", "region.py"] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index b927672..0000000 --- a/requirements.txt +++ /dev/null @@ -1 +0,0 @@ -cryptography>=3.1