Skip to content

Commit a8ce8a9

Browse files
committed
Packaging: Migrate build recipe to poethepoet definition
1 parent 399ba03 commit a8ce8a9

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

Makefile

+3-14
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ test-coverage: install-tests
4444
# ----------------------
4545
# Linting and Formatting
4646
# ----------------------
47-
format: install-releasetools
47+
format: install-tests
4848
$(poe) format
4949

5050

@@ -53,7 +53,8 @@ format: install-releasetools
5353
# -------
5454

5555
# Release this piece of software
56-
release: push build pypi-upload
56+
release:
57+
poe release
5758

5859

5960
# -------------
@@ -74,22 +75,10 @@ docs-autobuild: install-doctools
7475
# ===============
7576
# Utility targets
7677
# ===============
77-
push:
78-
git push && git push --tags
79-
80-
build: install-releasetools
81-
@$(python) -m build
82-
83-
pypi-upload: install-releasetools
84-
$(twine) upload --skip-existing --verbose dist/*{.tar.gz,.whl}
85-
8678
install-doctools:
8779
@test -e $(python) || python3 -m venv $(venvpath)
8880
$(pip) install --quiet --upgrade --requirement=docs/requirements.txt
8981

90-
install-releasetools: setup-virtualenv
91-
@$(pip) install --requirement requirements-release.txt --upgrade
92-
9382
install-tests: setup-virtualenv
9483
@test -e $(pytest) || $(pip) install --editable=.[test,develop] --upgrade
9584
@touch $(venvpath)/bin/activate

pyproject.toml

+11
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,14 @@ test = [
128128
]
129129
build = {cmd="python -m build"}
130130
check = ["lint", "test"]
131+
release = [
132+
{ cmd = "pip install --upgrade --editable=.[develop]" },
133+
{ cmd = "pip install --upgrade --requirement requirements-release.txt" },
134+
# TODO: Add a basic bump step, which only runs the `git tag` and `git push` commands,
135+
# but offers a convenience option to bump by "patch", "minor", or "major" levels.
136+
# TODO: Remind user about updating the changelog file accordingly. Or use `towncrier`?
137+
{ cmd = "git push" },
138+
{ cmd = "git push --tags" },
139+
{ cmd = "python -m build" },
140+
{ cmd = "twine upload --skip-existing --verbose dist/*" },
141+
]

requirements-release.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
twine
21
keyring
2+
twine

0 commit comments

Comments
 (0)