Skip to content

Commit

Permalink
Improve project tooling re. "releasing"
Browse files Browse the repository at this point in the history
  • Loading branch information
amotl committed Aug 3, 2022
1 parent 2e516ac commit 3b98db5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
13 changes: 6 additions & 7 deletions Makefile
Expand Up @@ -24,6 +24,7 @@ $(eval proselint := $(venvpath)/bin/proselint)
# Setup Python virtualenv
setup-virtualenv:
@test -e $(python) || python3 -m venv $(venvpath)
$(pip) install --requirement=requirements-utils.txt


# -------
Expand Down Expand Up @@ -55,7 +56,7 @@ test-coverage: install-tests
# Release this piece of software
# Synopsis:
# make release bump=minor (major,minor,patch)
release: bumpversion push sdist pypi-upload
release: bumpversion push build upload


# -------------
Expand All @@ -77,11 +78,11 @@ bumpversion: install-releasetools
push:
git push && git push --tags

sdist:
@$(python) setup.py sdist
build:
@$(python) -m build

pypi-upload: install-releasetools
twine upload --skip-existing --verbose dist/*.tar.gz
upload:
$(twine) upload --skip-existing dist/*{.tar.gz,.whl}

install-doctools: setup-virtualenv
@$(pip) install --quiet --requirement requirements-docs.txt --upgrade
Expand All @@ -100,12 +101,10 @@ install-tests: setup-virtualenv
# ----------------------

format: setup-virtualenv
$(pip) install --requirement=requirements-utils.txt
$(black) .
$(isort) .

lint: setup-virtualenv
$(pip) install --requirement=requirements-utils.txt
$(flake8) --exit-zero luftdatenpumpe tests
$(proselint) *.rst doc/**/*.rst || true

Expand Down
5 changes: 5 additions & 0 deletions requirements-utils.txt
@@ -1,5 +1,10 @@
# Sandbox
black
isort
pyproject-flake8
flake8<5
proselint

# Release
build
wheel

0 comments on commit 3b98db5

Please sign in to comment.