From 9f67caea02526480695442c5704b83d4a7dcc557 Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 23 Apr 2024 00:05:39 +0300 Subject: [PATCH] build: update to reflect setuptools to hatch change 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. --- .gitignore | 2 -- Makefile.local | 15 +++++---------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index ab5dd9f6..868bdd19 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,5 @@ *~ .coverage .venv -build dist -hawkmoth.egg-info test/coverage-report diff --git a/Makefile.local b/Makefile.local index 8a4143bb..56b6f17a 100644 --- a/Makefile.local +++ b/Makefile.local @@ -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: @@ -44,4 +39,4 @@ distclean: clean .SUFFIXES: -DISTCLEAN := $(DISTCLEAN) build dist hawkmoth.egg-info +DISTCLEAN := $(DISTCLEAN) dist