aprsd-slack-plugin/Makefile

51 lines
1.0 KiB
Makefile
Raw Normal View History

.PHONY: virtual dev build-requirements black isort flake8
2021-06-15 17:28:35 -04:00
REQUIREMENTS_TXT ?= requirements.txt dev-requirements.txt
2021-06-15 17:28:35 -04:00
include Makefile.venv
Makefile.venv:
curl \
-o Makefile.fetched \
-L "https://github.com/sio/Makefile.venv/raw/v2020.08.14/Makefile.venv"
echo "5afbcf51a82f629cd65ff23185acde90ebe4dec889ef80bbdc12562fbd0b2611 *Makefile.fetched" \
| sha256sum --check - \
&& mv Makefile.fetched Makefile.venv
2021-06-15 17:28:35 -04:00
all: pip dev
2021-06-15 17:28:35 -04:00
.PHONY: dev
dev: venv
$(VENV)/pre-commit install
2021-06-15 17:28:35 -04:00
.PHONY: docs
docs: build
cp README.rst docs/readme.rst
cp Changelog docs/changelog.rst
tox -edocs
2021-06-15 17:28:35 -04:00
clean: clean-venv
rm -rf dist/*
2021-06-15 17:28:35 -04:00
.PHONY: test
test: dev
2021-01-15 14:16:44 -05:00
tox -p all
build: test
2021-06-15 17:28:35 -04:00
$(VENV)/python3 setup.py sdist bdist_wheel
$(VENV)/twine check dist/*
upload: build
2021-06-15 17:28:35 -04:00
$(VENV)/twine upload dist/*
2021-06-15 17:28:35 -04:00
update-requirements: dev
$(VENV)/pip-compile requirements.in
$(VENV)/pip-compile dev-requirements.in
2021-06-15 17:28:35 -04:00
check: dev # Code format check with isort and black
tox -efmt-check
tox -epep8
2021-06-15 17:28:35 -04:00
fix: dev # fixes code formatting with isort and black
tox -efmt