diff --git a/pyproject.toml b/pyproject.toml index 981f761..9e77604 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,7 @@ +[build-system] +requires = ["hatchling", "hatch-vcs"] +build-backend = "hatchling.build" + [project] name = "django-minio-storage" description = "Django file storage using the minio python client" @@ -27,18 +31,23 @@ maintainers = [ readme = "README.md" dynamic = ["version"] -[build-system] -requires = ["setuptools>=77.0.3", "setuptools_scm[toml]>=6.2"] - [project.urls] Homepage = "https://github.com/py-pa/django-minio-storage" Repository = "https://github.com/py-pa/django-minio-storage" Documentation = "https://django-minio-storage.readthedocs.io/" -[tool.setuptools_scm] -write_to = "minio_storage/version.py" -write_to_template = '__version__ = "{version}"' -tag_regex = "^v(?Pv)?(?P[^\\+]+)(?P.*)?$" +[tool.hatch.build] +packages = [ + "minio_storage", +] + +[tool.hatch.version] +source = "vcs" +tag-pattern = "^v(?Pv)?(?P[^\\+]+)(?P.*)?$" + +[tool.hatch.build.hooks.vcs] +version-file = "minio_storage/version.py" +template = '__version__ = "{version}"' [tool.ruff] target-version = "py39" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 42f8ec9..0000000 --- a/setup.cfg +++ /dev/null @@ -1,7 +0,0 @@ -[options] -packages = find: - - -[options.packages.find] -include = - minio_storage diff --git a/setup.py b/setup.py deleted file mode 100644 index 6068493..0000000 --- a/setup.py +++ /dev/null @@ -1,3 +0,0 @@ -from setuptools import setup - -setup()