2018-02-14 23:37:15 +00:00
|
|
|
env:
|
2018-04-11 16:08:03 +00:00
|
|
|
python3 -m venv env
|
2018-04-09 17:44:30 +00:00
|
|
|
./env/bin/pip install -r requirements-dev.txt
|
2018-02-14 23:37:15 +00:00
|
|
|
|
2018-02-17 02:09:10 +00:00
|
|
|
.PHONY: run
|
2018-02-14 23:37:15 +00:00
|
|
|
run: env
|
|
|
|
./env/bin/python -m minitor.main
|
2018-02-17 02:09:10 +00:00
|
|
|
|
2018-04-09 17:44:30 +00:00
|
|
|
.PHONY: test
|
|
|
|
test: env
|
2018-04-11 16:57:22 +00:00
|
|
|
./env/bin/tox
|
2018-04-09 17:44:30 +00:00
|
|
|
|
2018-02-17 02:09:10 +00:00
|
|
|
.PHONY: build
|
2018-04-10 00:26:32 +00:00
|
|
|
build: test
|
2018-02-17 02:09:10 +00:00
|
|
|
./env/bin/python setup.py sdist
|
|
|
|
./env/bin/python setup.py bdist_wheel
|
|
|
|
|
|
|
|
.PHONY: upload
|
|
|
|
upload: env
|
|
|
|
./env/bin/twine upload dist/*
|
|
|
|
|
|
|
|
.PHONY: upload-test
|
|
|
|
upload-test: env
|
|
|
|
./env/bin/twine upload --repository-url https://test.pypi.org/legacy/ dist/*
|
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2018-04-10 18:28:09 +00:00
|
|
|
rm -fr ./build ./minitor.egg-info ./htmlcov ./.coverage ./.pytest_cache ./.tox
|
2018-04-11 16:57:22 +00:00
|
|
|
find . -name '*.pyc' -delete
|
|
|
|
find . -name '__pycache__' -delete
|
2018-04-10 18:28:09 +00:00
|
|
|
|
|
|
|
.PHONY: dist-clean
|
|
|
|
dist-clean: clean
|
2018-04-11 16:57:22 +00:00
|
|
|
rm -fr ./dist ./env
|
2018-04-09 17:44:30 +00:00
|
|
|
|
2018-04-10 00:26:32 +00:00
|
|
|
.PHONY: install-hooks
|
2018-04-09 17:44:30 +00:00
|
|
|
install-hooks:
|
2018-04-11 16:57:22 +00:00
|
|
|
./env/bin/tox -e pre-commit -- install -f --install-hooks
|
2018-04-10 18:28:09 +00:00
|
|
|
|
|
|
|
.coverage:
|
2018-04-11 16:57:22 +00:00
|
|
|
./env/bin/tox
|
2018-04-10 18:28:09 +00:00
|
|
|
|
|
|
|
htmlcov/index.html: .coverage
|
|
|
|
./env/bin/coverage html
|
|
|
|
|
|
|
|
.PHONY: open-coverage
|
|
|
|
open-coverage: htmlcov/index.html
|
|
|
|
open htmlcov/index.html
|