| 1 |
From: Christopher Obbard <[email protected]> |
| 2 |
Date: Mon, 6 Apr 2026 00:46:57 +0100 |
| 3 |
Subject: Add pyproject.toml |
| 4 |
|
| 5 |
pybuild defaults to the distutils plugin which requires setup.py. |
| 6 |
Add a minimal pyproject.toml using the setuptools backend. The mbn |
| 7 |
package is discovered via namespace package find and the top-level |
| 8 |
scripts are installed as script-files. |
| 9 |
|
| 10 |
Also remove the now useless requirements.txt file and update the |
| 11 |
README to use the new method of installation. |
| 12 |
|
| 13 |
Signed-off-by: Christopher Obbard <[email protected]> |
| 14 |
|
| 15 |
Forwarded: https://github.com/msm8916-mainline/qtestsign/pull/8 |
| 16 |
Last-Update: 2026-07-07 |
| 17 |
--- |
| 18 |
README.md | 5 ++++- |
| 19 |
pyproject.toml | 18 ++++++++++++++++++ |
| 20 |
requirements.txt | 1 - |
| 21 |
3 files changed, 22 insertions(+), 2 deletions(-) |
| 22 |
create mode 100644 pyproject.toml |
| 23 |
delete mode 100644 requirements.txt |
| 24 |
|
| 25 |
diff --git a/README.md b/README.md |
| 26 |
index 31a3683..10291b2 100644 |
| 27 |
--- a/README.md |
| 28 |
+++ b/README.md |
| 29 |
@@ -22,9 +22,12 @@ On many distributions this will likely be already installed by default (but perh |
| 30 |
Alternatively you can install it with pip: |
| 31 |
|
| 32 |
``` |
| 33 |
-$ pip install -r requirements.txt |
| 34 |
+$ pip install . |
| 35 |
``` |
| 36 |
|
| 37 |
+If you are developing or modifying the tool, use `pip install -e .` instead so your code changes take effect immediately. |
| 38 |
+ |
| 39 |
+ |
| 40 |
Then, just use `./qtestsign.py --help` to figure out how the tool works. You need to specify the firmware type |
| 41 |
and the ELF image to sign, e.g. for [U-Boot]: |
| 42 |
|
| 43 |
diff --git a/pyproject.toml b/pyproject.toml |
| 44 |
new file mode 100644 |
| 45 |
index 0000000..be73a28 |
| 46 |
--- /dev/null |
| 47 |
+++ b/pyproject.toml |
| 48 |
@@ -0,0 +1,18 @@ |
| 49 |
+[build-system] |
| 50 |
+requires = ["setuptools"] |
| 51 |
+build-backend = "setuptools.build_meta" |
| 52 |
+ |
| 53 |
+[project] |
| 54 |
+name = "qtestsign" |
| 55 |
+version = "0.0" |
| 56 |
+requires-python = ">=3.7" |
| 57 |
+dependencies = [ |
| 58 |
+ "cryptography>=3.1", |
| 59 |
+] |
| 60 |
+ |
| 61 |
+[tool.setuptools.packages.find] |
| 62 |
+namespaces = true |
| 63 |
+include = ["mbn"] |
| 64 |
+ |
| 65 |
+[tool.setuptools] |
| 66 |
+script-files = ["qtestsign.py", "merge.py", "patchxbl.py", "strip.py", "region.py"] |
| 67 |
diff --git a/requirements.txt b/requirements.txt |
| 68 |
deleted file mode 100644 |
| 69 |
index b927672..0000000 |
| 70 |
--- a/requirements.txt |
| 71 |
+++ /dev/null |
| 72 |
@@ -1 +0,0 @@ |
| 73 |
-cryptography>=3.1 |