1
0
mirror of https://github.com/craigerl/aprsd.git synced 2024-11-17 13:51:54 -05:00

Updated Makefile

This patch updates the Makefile to only run deps if certain files
don't exist already.   Also added the build and upload tasks to
make it easier to test, build and upload a release to pypi
This commit is contained in:
Hemna 2021-01-08 20:56:39 -05:00
parent a7c20430fe
commit c51a9452d9
4 changed files with 200 additions and 62 deletions

View File

@ -1,25 +1,54 @@
.PHONY: virtual install build-requirements black isort flake8
.PHONY: virtual dev build-requirements black isort flake8
all: pip dev
virtual: .venv/bin/pip # Creates an isolated python 3 environment
.venv/bin/pip:
virtualenv -p /usr/bin/python3 .venv
install:
.venv/bin/aprsd: virtual
test -s .venv/bin/aprsd || .venv/bin/pip install -q -e .
install: .venv/bin/aprsd
.venv/bin/pip install -Ur requirements.txt
dev: virtual
.venv/bin/pip install -e .
.venv/bin/pre-commit install
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
test: dev
.venv/bin/pre-commit run --all-files
tox -p
update-requirements: install
.venv/bin/pip freeze > requirements.txt
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
.venv/bin/tox: # install tox
.venv/bin/pip install -U tox
test -s .venv/bin/tox || .venv/bin/pip install -q -U tox
check: .venv/bin/tox # Code format check with isort and black
tox -efmt-check

View File

@ -7,3 +7,4 @@ pytest-cov
pep8-naming
Sphinx
tox
twine

View File

@ -4,58 +4,166 @@
#
# pip-compile dev-requirements.in
#
alabaster==0.7.12 # via sphinx
appdirs==1.4.4 # via black, virtualenv
attrs==20.3.0 # via pytest
babel==2.9.0 # via sphinx
black==20.8b1 # via -r dev-requirements.in
certifi==2020.12.5 # via requests
chardet==4.0.0 # via requests
click==7.1.2 # via black
coverage==5.3 # via pytest-cov
distlib==0.3.1 # via virtualenv
docutils==0.16 # via sphinx
filelock==3.0.12 # via tox, virtualenv
flake8-polyfill==1.0.2 # via pep8-naming
flake8==3.8.4 # via -r dev-requirements.in, flake8-polyfill
idna==2.10 # via requests
imagesize==1.2.0 # via sphinx
iniconfig==1.1.1 # via pytest
isort==5.6.4 # via -r dev-requirements.in
jinja2==2.11.2 # via sphinx
markupsafe==1.1.1 # via jinja2
mccabe==0.6.1 # via flake8
mypy-extensions==0.4.3 # via black, mypy
mypy==0.790 # via -r dev-requirements.in
packaging==20.8 # via pytest, sphinx, tox
pathspec==0.8.1 # via black
pep8-naming==0.11.1 # via -r dev-requirements.in
pluggy==0.13.1 # via pytest, tox
py==1.10.0 # via pytest, tox
pycodestyle==2.6.0 # via flake8
pyflakes==2.2.0 # via flake8
pygments==2.7.3 # via sphinx
pyparsing==2.4.7 # via packaging
pytest-cov==2.10.1 # via -r dev-requirements.in
pytest==6.2.1 # via -r dev-requirements.in, pytest-cov
pytz==2020.4 # via babel
regex==2020.11.13 # via black
requests==2.25.1 # via sphinx
six==1.15.0 # via tox, virtualenv
snowballstemmer==2.0.0 # via sphinx
sphinx==3.3.1 # via -r dev-requirements.in
sphinxcontrib-applehelp==1.0.2 # via sphinx
sphinxcontrib-devhelp==1.0.2 # via sphinx
sphinxcontrib-htmlhelp==1.0.3 # via sphinx
sphinxcontrib-jsmath==1.0.1 # via sphinx
sphinxcontrib-qthelp==1.0.3 # via sphinx
sphinxcontrib-serializinghtml==1.1.4 # via sphinx
toml==0.10.2 # via black, pytest, tox
tox==3.20.1 # via -r dev-requirements.in
typed-ast==1.4.1 # via black, mypy
typing-extensions==3.7.4.3 # via black, mypy
urllib3==1.26.2 # via requests
virtualenv==20.2.2 # via tox
alabaster==0.7.12
# via sphinx
appdirs==1.4.4
# via
# black
# virtualenv
attrs==20.3.0
# via pytest
babel==2.9.0
# via sphinx
black==20.8b1
# via -r dev-requirements.in
bleach==3.2.1
# via readme-renderer
certifi==2020.12.5
# via requests
chardet==4.0.0
# via requests
click==7.1.2
# via black
colorama==0.4.4
# via twine
coverage==5.3.1
# via pytest-cov
distlib==0.3.1
# via virtualenv
docutils==0.16
# via
# readme-renderer
# sphinx
filelock==3.0.12
# via
# tox
# virtualenv
flake8-polyfill==1.0.2
# via pep8-naming
flake8==3.8.4
# via
# -r dev-requirements.in
# flake8-polyfill
idna==2.10
# via requests
imagesize==1.2.0
# via sphinx
iniconfig==1.1.1
# via pytest
isort==5.7.0
# via -r dev-requirements.in
jinja2==2.11.2
# via sphinx
keyring==21.8.0
# via twine
markupsafe==1.1.1
# via jinja2
mccabe==0.6.1
# via flake8
mypy-extensions==0.4.3
# via
# black
# mypy
mypy==0.790
# via -r dev-requirements.in
packaging==20.8
# via
# bleach
# pytest
# sphinx
# tox
pathspec==0.8.1
# via black
pep8-naming==0.11.1
# via -r dev-requirements.in
pkginfo==1.6.1
# via twine
pluggy==0.13.1
# via
# pytest
# tox
py==1.10.0
# via
# pytest
# tox
pycodestyle==2.6.0
# via flake8
pyflakes==2.2.0
# via flake8
pygments==2.7.3
# via
# readme-renderer
# sphinx
pyparsing==2.4.7
# via packaging
pytest-cov==2.10.1
# via -r dev-requirements.in
pytest==6.2.1
# via
# -r dev-requirements.in
# pytest-cov
pytz==2020.5
# via babel
readme-renderer==28.0
# via twine
regex==2020.11.13
# via black
requests-toolbelt==0.9.1
# via twine
requests==2.25.1
# via
# requests-toolbelt
# sphinx
# twine
rfc3986==1.4.0
# via twine
six==1.15.0
# via
# bleach
# readme-renderer
# tox
# virtualenv
snowballstemmer==2.0.0
# via sphinx
sphinx==3.4.3
# via -r dev-requirements.in
sphinxcontrib-applehelp==1.0.2
# via sphinx
sphinxcontrib-devhelp==1.0.2
# via sphinx
sphinxcontrib-htmlhelp==1.0.3
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.3
# via sphinx
sphinxcontrib-serializinghtml==1.1.4
# via sphinx
toml==0.10.2
# via
# black
# pytest
# tox
tox==3.21.0
# via -r dev-requirements.in
tqdm==4.55.1
# via twine
twine==3.3.0
# via -r dev-requirements.in
typed-ast==1.4.2
# via
# black
# mypy
typing-extensions==3.7.4.3
# via
# black
# mypy
urllib3==1.26.2
# via requests
virtualenv==20.2.2
# via tox
webencodings==0.5.1
# via bleach
# The following packages are considered to be unsafe in a requirements file:
# setuptools

View File

@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile
# pip-compile requirements.in
#
appdirs==1.4.4
# via virtualenv
@ -22,7 +22,7 @@ click==7.1.2
# click-completion
distlib==0.3.1
# via virtualenv
dnspython==2.0.0
dnspython==2.1.0
# via py3-validate-email
filelock==3.0.12
# via