1
0
mirror of https://github.com/ihabunek/toot.git synced 2024-11-03 04:17:21 -05:00

Add make bundle for creating a pyz bundle

This commit is contained in:
Ivan Habunek 2023-12-05 08:51:09 +01:00
parent 24866bd4e4
commit e8dac36de3
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
2 changed files with 19 additions and 5 deletions

10
.gitignore vendored
View File

@ -6,12 +6,14 @@
/.env
/.envrc
/.pytest_cache/
/book
/build/
/bundle/
/dist/
/htmlcov/
/tmp/
/toot-*.tar.gz
debug.log
/pyrightconfig.json
/tmp/
/toot-*.pyz
/toot-*.tar.gz
/venv/
/book
debug.log

View File

@ -20,7 +20,7 @@ coverage:
clean :
find . -name "*pyc" | xargs rm -rf $1
rm -rf build dist MANIFEST htmlcov toot*.tar.gz
rm -rf build dist MANIFEST htmlcov bundle toot*.tar.gz toot*.pyz
changelog:
./scripts/generate_changelog > CHANGELOG.md
@ -34,3 +34,15 @@ docs-serve:
docs-deploy: docs
rsync --archive --compress --delete --stats book/ bezdomni:web/toot
bundle:
mkdir bundle
cp toot/__main__.py bundle
pip install . --target=bundle
rm -rf bundle/*.dist-info
find bundle/ -type d -name "__pycache__" -exec rm -rf {} +
python -m zipapp \
--python "/usr/bin/env python3" \
--output toot-`git describe`.pyz bundle \
--compress
echo "Bundle created: toot-`git describe`.pyz"