add setup.py

This commit is contained in:
relikd
2022-04-08 14:09:36 +02:00
parent 68167e9d1d
commit 8784edd18f
4 changed files with 93 additions and 0 deletions

16
Makefile Normal file
View File

@@ -0,0 +1,16 @@
dist: setup.py botlib/*
@echo Building...
python3 setup.py sdist bdist_wheel
rm -rf ./*.egg-info/ ./build/ MANIFEST
env-publish:
@echo Creating virtual environment...
@python3 -m venv 'env-publish'
@source env-publish/bin/activate && pip install twine
.PHONY: publish
publish: dist env-publish
[ -z "$${VIRTUAL_ENV}" ] # you can not do this inside a virtual environment.
@echo Publishing...
@echo "\033[0;31mEnter PyPI token in password prompt:\033[0m"
@source env-publish/bin/activate && export TWINE_USERNAME='__token__' && twine upload dist/*