2021-01-08 20:56:39 -05:00
|
|
|
.PHONY: virtual dev build-requirements black isort flake8
|
|
|
|
|
|
|
|
all: pip dev
|
2021-01-08 17:23:35 -05:00
|
|
|
|
|
|
|
virtual: .venv/bin/pip # Creates an isolated python 3 environment
|
|
|
|
|
|
|
|
.venv/bin/pip:
|
|
|
|
virtualenv -p /usr/bin/python3 .venv
|
|
|
|
|
2021-01-08 20:56:39 -05:00
|
|
|
.venv/bin/aprsd: virtual
|
|
|
|
test -s .venv/bin/aprsd || .venv/bin/pip install -q -e .
|
|
|
|
|
|
|
|
install: .venv/bin/aprsd
|
2021-01-08 17:23:35 -05:00
|
|
|
.venv/bin/pip install -Ur requirements.txt
|
|
|
|
|
2021-01-08 20:56:39 -05:00
|
|
|
dev-pre-commit:
|
|
|
|
test -s .git/hooks/pre-commit || .venv/bin/pre-commit install
|
|
|
|
|
|
|
|
dev-requirements:
|
|
|
|
test -s .venv/bin/twine || .venv/bin/pip install -q -r dev-requirements.txt
|
|
|
|
|
|
|
|
pip: virtual
|
|
|
|
.venv/bin/pip install -q -U pip
|
|
|
|
|
|
|
|
dev: pip .venv/bin/aprsd dev-requirements dev-pre-commit
|
|
|
|
|
|
|
|
pip-tools:
|
|
|
|
test -s .venv/bin/pip-compile || .venv/bin/pip install pip-tools
|
|
|
|
|
|
|
|
clean:
|
|
|
|
rm -rf dist/*
|
|
|
|
rm -rf .venv
|
2021-01-08 17:23:35 -05:00
|
|
|
|
|
|
|
test: dev
|
2021-01-08 20:56:39 -05:00
|
|
|
.venv/bin/pre-commit run --all-files
|
2021-01-08 17:23:35 -05:00
|
|
|
tox -p
|
|
|
|
|
2021-01-08 20:56:39 -05:00
|
|
|
build: test
|
|
|
|
rm -rf dist/*
|
|
|
|
.venv/bin/python3 setup.py sdist bdist_wheel
|
|
|
|
.venv/bin/twine check dist/*
|
|
|
|
|
|
|
|
upload: build
|
|
|
|
.venv/bin/twine upload dist/*
|
|
|
|
|
|
|
|
update-requirements: dev pip-tools
|
|
|
|
.venv/bin/pip-compile -q -U requirements.in
|
|
|
|
.venv/bin/pip-compile -q -U dev-requirements.in
|
2021-01-08 17:23:35 -05:00
|
|
|
|
|
|
|
.venv/bin/tox: # install tox
|
2021-01-08 20:56:39 -05:00
|
|
|
test -s .venv/bin/tox || .venv/bin/pip install -q -U tox
|
2021-01-08 17:23:35 -05:00
|
|
|
|
|
|
|
check: .venv/bin/tox # Code format check with isort and black
|
|
|
|
tox -efmt-check
|
|
|
|
tox -epep8
|
|
|
|
|
|
|
|
fix: .venv/bin/tox # fixes code formatting with isort and black
|
2021-01-09 09:58:56 -05:00
|
|
|
tox -efmt
|