1
0
mirror of https://github.com/craigerl/aprsd.git synced 2025-07-22 18:25:16 -04: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 virtual: .venv/bin/pip # Creates an isolated python 3 environment
.venv/bin/pip: .venv/bin/pip:
virtualenv -p /usr/bin/python3 .venv 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 .venv/bin/pip install -Ur requirements.txt
dev: virtual dev-pre-commit:
.venv/bin/pip install -e . test -s .git/hooks/pre-commit || .venv/bin/pre-commit install
.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 test: dev
.venv/bin/pre-commit run --all-files
tox -p tox -p
update-requirements: install build: test
.venv/bin/pip freeze > requirements.txt 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/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 check: .venv/bin/tox # Code format check with isort and black
tox -efmt-check tox -efmt-check

View File

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

View File

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

View File

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