From 9ad47f8ef9eccf2e8927713613fcedffe4c94896 Mon Sep 17 00:00:00 2001 From: David Larlet Date: Sat, 17 Jun 2023 09:36:50 -0400 Subject: [PATCH] Customize the build process with hatch --- Makefile | 6 ++++-- pyproject.toml | 8 ++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index e9d16ec5..ebea95cf 100644 --- a/Makefile +++ b/Makefile @@ -24,11 +24,13 @@ docker: ## Create a new Docker image and publish it docker build -t umap/umap:${VERSION} . docker push umap/umap:${VERSION} +.PHONY: build +build: test compilemessages ## Build the Python package before release + @hatch build + test: py.test -xv umap/tests/ -release: test compilemessages - python setup.py sdist bdist_wheel test_publish: twine upload -r testpypi dist/* publish: diff --git a/pyproject.toml b/pyproject.toml index f608ac8c..318b4ee1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,14 @@ docker = [ "uwsgi==2.0.21", ] +[tool.hatch.build.targets.sdist] +include = [ + "/umap", +] + +[tool.hatch.build.targets.wheel] +packages = ["umap"] + [project.scripts] umap = "umap.bin:main"