Customize the build process with hatch

This commit is contained in:
David Larlet 2023-06-17 09:36:50 -04:00
parent e23f1dd3c2
commit 9ad47f8ef9
No known key found for this signature in database
GPG key ID: 3E2953A359E7E7BD
2 changed files with 12 additions and 2 deletions

View file

@ -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:

View file

@ -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"