feat: launcher script for running from a checkout without uv

Only click and cryptography are needed, both packaged by Arch, so a
plain ./boltcard-writer works when uv cannot be installed (Omarchy's
pinned mirror 404'd on the uv package during the first field test).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Padreug 2026-09-20 21:58:47 +02:00
commit af736e09a9
3 changed files with 23 additions and 2 deletions

View file

@ -26,8 +26,19 @@ uv run boltcard-writer readers
```
`uv run` creates a virtualenv and installs the two Python dependencies on
first use (needs internet once). With the ACR1252U plugged in you should see
two readers, the starred one is used:
first use (needs internet once).
**No uv?** (e.g. the Omarchy mirror 404s on the package, try
`sudo pacman -Syu uv` first). The only dependencies are click and
cryptography, both in Arch's repos, and the checkout ships a launcher:
```sh
sudo pacman -S --needed python python-click python-cryptography
./boltcard-writer readers # instead of `uv run boltcard-writer readers`
```
With the ACR1252U plugged in you should see two readers, the starred one is
used:
```
* ACS ACR1252 1S CL Reader PICC 00 00

7
boltcard-writer Executable file
View file

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Run from a checkout without uv: needs python3 + click + cryptography
# (Arch: sudo pacman -S --needed python python-click python-cryptography).
set -euo pipefail
here="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
export PYTHONPATH="$here/src${PYTHONPATH:+:$PYTHONPATH}"
exec python3 -m boltcard_writer "$@"

View file

@ -0,0 +1,3 @@
from .cli import main
main(prog_name="boltcard-writer")