Skip to content

Commit 2b49387

Browse files
committed
README: document dependencies and Makefile targets
Add a Development section explaining: - How to install ruff (from snap) and mypy (from apt) on Debian/Ubuntu - All available Makefile targets with descriptions - Quick start commands for linting and building Signed-off-by: Igor Opaniuk <igor.opaniuk@oss.qualcomm.com>
1 parent 815999b commit 2b49387

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,48 @@ qcom-ptool contains various device partitioning utilities like ptool.py, gen_par
77

88
# Development
99

10+
## Dependencies
11+
12+
The scripts use only the Python standard library (Python 3.8+), so no
13+
runtime dependencies need to be installed.
14+
15+
For development, `make lint` invokes `ruff` and `mypy` directly from the
16+
command line. On Debian/Ubuntu, install them as follows (ruff is not
17+
packaged in apt on all releases/architectures, so we install it from
18+
snap):
19+
20+
```sh
21+
sudo snap install ruff
22+
sudo apt install mypy
23+
```
24+
25+
## Makefile targets
26+
27+
| Target | Description |
28+
|---------------|------------------------------------------------------------|
29+
| `all` | Generate partition XML and GPT binaries for all platforms |
30+
| `lint` | Run ruff (linter) and mypy (type checker) on all scripts |
31+
| `integration` | Build all platforms and verify generated files are present |
32+
| `check` | Run both `lint` and `integration` |
33+
| `install` | Install scripts to `$(DESTDIR)$(PREFIX)/bin` |
34+
| `clean` | Remove generated XML and binary files from platforms/ |
35+
36+
### Quick start
37+
38+
```sh
39+
# install linters (Debian/Ubuntu)
40+
sudo snap install ruff
41+
sudo apt install mypy
42+
43+
# run linters
44+
make lint
45+
46+
# build all platforms and run tests
47+
make check
48+
```
49+
50+
## Code contributions
51+
1052
See [CONTRIBUTING.md file](CONTRIBUTING.md) for instructions on how to send
1153
code contributions to this project. You can also [report an issue on
1254
GitHub](../../issues).

0 commit comments

Comments
 (0)