Skip to content

Commit 10a7d0f

Browse files
committed
Use Hatchling for package builds
1 parent 25798c5 commit 10a7d0f

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

pyproject.toml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
[build-system]
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
4+
15
[project]
26
name = "django-minio-storage"
37
description = "Django file storage using the minio python client"
@@ -27,18 +31,23 @@ maintainers = [
2731
readme = "README.md"
2832
dynamic = ["version"]
2933

30-
[build-system]
31-
requires = ["setuptools>=77.0.3", "setuptools_scm[toml]>=6.2"]
32-
3334
[project.urls]
3435
Homepage = "https://github.com/py-pa/django-minio-storage"
3536
Repository = "https://github.com/py-pa/django-minio-storage"
3637
Documentation = "https://django-minio-storage.readthedocs.io/"
3738

38-
[tool.setuptools_scm]
39-
write_to = "minio_storage/version.py"
40-
write_to_template = '__version__ = "{version}"'
41-
tag_regex = "^v(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
39+
[tool.hatch.build]
40+
packages = [
41+
"minio_storage",
42+
]
43+
44+
[tool.hatch.version]
45+
source = "vcs"
46+
tag-pattern = "^v(?P<prefix>v)?(?P<version>[^\\+]+)(?P<suffix>.*)?$"
47+
48+
[tool.hatch.build.hooks.vcs]
49+
version-file = "minio_storage/version.py"
50+
template = '__version__ = "{version}"'
4251

4352
[tool.ruff]
4453
target-version = "py39"

setup.cfg

Lines changed: 0 additions & 7 deletions
This file was deleted.

setup.py

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)