- Add 'shiv' to dev dependencies in pyproject.toml - Add dist/ to .gitignore - Create packaging/build-shiv script: builds dist/eris zipapp via shiv -e eris.__main__:entry_point --compile-pyc --reproducible - Update uv.lock
26 lines
480 B
Bash
Executable file
26 lines
480 B
Bash
Executable file
#!/bin/bash
|
|
|
|
|
|
set -e
|
|
set -x
|
|
|
|
|
|
cd "$(dirname "$0")/.."
|
|
mkdir -p dist
|
|
REQS=$(mktemp)
|
|
uv export --no-dev --no-header --no-emit-project --no-hashes > "$REQS"
|
|
uv build --wheel --out-dir dist
|
|
WHEEL=$(ls dist/eris-*.whl 2>/dev/null | head -1)
|
|
if [ -z "$WHEEL" ]; then
|
|
echo "No wheel found in dist/" >&2
|
|
exit 1
|
|
fi
|
|
uv run shiv \
|
|
-e "eris.__main__:entry_point" \
|
|
-o dist/eris \
|
|
--compile-pyc \
|
|
--reproducible \
|
|
--no-deps \
|
|
-r "$REQS" \
|
|
"$WHEEL"
|
|
rm -f "$REQS" "$WHEEL"
|