prepare for distribution

This commit is contained in:
relikd
2021-10-30 15:29:00 +02:00
parent 526d1b8ea6
commit b4cba899bc
3 changed files with 18 additions and 4 deletions

View File

@@ -19,12 +19,22 @@ uninstall:
test:
python3 tests/test_icnsutil.py
dist-env:
@echo Creating virtual environment...
@python3 -m venv 'dist-env'
@source dist-env/bin/activate && pip install twine
.PHONY: dist
dist:
@python3 setup.py sdist --formats=tar bdist_wheel \
|| echo '-> you can not do this inside a virtual environment.'
dist: dist-env
[ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment.
rm -rf dist
@echo Building...
python3 setup.py sdist bdist_wheel
@echo
rm -rf ./*.egg-info/ ./build/ MANIFEST
@echo Publishing...
@echo "\033[0;31mEnter your PyPI token:\033[0m"
@source dist-env/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/*
_icns_list.txt:
@echo 'Generate list of system icns files...'