Skip to content

Commit

Permalink
build: update to reflect setuptools to hatch change
Browse files Browse the repository at this point in the history
Use hatch build and publish, remove old build-tools target, remove old
.gitignore and distclean files.

The build and upload targets could perhaps be removed in the future in
favour of using hatch directly, but keep them for now.
  • Loading branch information
jnikula committed Apr 23, 2024
1 parent 9725336 commit f9a2322
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@
*~
.coverage
.venv
build
dist
hawkmoth.egg-info
test/coverage-report
15 changes: 5 additions & 10 deletions Makefile.local
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,18 @@ check-style:
check-rst:
rst-lint --level warning $(RST)

# assume virtual environment is used for dist and upload
.PHONY: build-tools
build-tools:
pip install --upgrade build twine

# Build and publish
.PHONY: build
build:
rm -rf build dist hawkmoth.egg-info
python3 -m build
hatch build

.PHONY: test-upload
test-upload:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
hatch publish --repo test

.PHONY: upload
upload:
twine upload dist/*
hatch publish

.PHONY: clean
clean:
Expand All @@ -44,4 +39,4 @@ distclean: clean

.SUFFIXES:

DISTCLEAN := $(DISTCLEAN) build dist hawkmoth.egg-info
DISTCLEAN := $(DISTCLEAN) dist

0 comments on commit f9a2322

Please sign in to comment.