Skip to content

Commit 7ea6fd7

Browse files
committed
util: Add helper script to generate requirement files
The helper script uses the uv command to create universal requirement files. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
1 parent 1213fd6 commit 7ea6fd7

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

util/compile-requirements.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#!/bin/bash
2+
3+
if ! command -v uv 2>&1 >/dev/null
4+
then
5+
echo "uv command could not be found"
6+
echo "See https://docs.astral.sh/uv/ for installation instructions"
7+
exit 1
8+
fi
9+
10+
common_args="--quiet --upgrade --universal --python-version 3.9 --generate-hashes"
11+
12+
uv python install 3.9 3.10 3.11 3.12 3.13
13+
uv pip compile $common_args -o requirements.txt pyproject.toml
14+
uv pip compile $common_args --group tox -o requirements-tox.txt pyproject.toml
15+
echo -e "build\nsetuptools" | uv pip compile $common_args -o requirements-install-build.txt -
16+
echo "tox" | uv pip compile $common_args -o requirements-install-tox.txt -

0 commit comments

Comments
 (0)