Add bundling with zipapp

This commit is contained in:
Ivan Habunek 2020-08-13 13:47:03 +02:00
parent bbed398cf6
commit 04ddadef26
No known key found for this signature in database
GPG Key ID: CDBD63C43A30BB95
3 changed files with 14 additions and 1 deletions

2
.gitignore vendored
View File

@ -11,3 +11,5 @@ tmp/
/htmlcov
/twitch-dl-*.tar.gz
/twitch-dl.1.man
/bundle
/*.pyz

View File

@ -6,7 +6,15 @@ dist :
clean :
find . -name "*pyc" | xargs rm -rf $1
rm -rf build dist MANIFEST htmlcov deb_dist twitch-dl*.tar.gz twitch-dl.1.man
rm -rf build dist bundle MANIFEST htmlcov deb_dist twitch-dl*.tar.gz twitch-dl.1.man
bundle:
mkdir bundle
cp twitchdl/__main__.py bundle
pip install . --target=bundle
rm -rf bundle/*.dist-info
python -m zipapp -p "/usr/bin/env python3" bundle
mv bundle.pyz twitchdl.pyz
publish :
twine upload dist/*.tar.gz dist/*.whl

3
twitchdl/__main__.py Normal file
View File

@ -0,0 +1,3 @@
from twitchdl.console import main
main()