Skip to content

Commit df84de7

Browse files
feat: migrate build backend to hatchling
1 parent f66d64e commit df84de7

File tree

4 files changed

+27
-61
lines changed

4 files changed

+27
-61
lines changed

MANIFEST.in

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

hatch_build.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: MIT
2+
3+
from hatchling.metadata.plugin.interface import MetadataHookInterface
4+
5+
6+
class CustomMetadataHook(MetadataHookInterface):
7+
def update(self, metadata: dict) -> None:
8+
metadata["optional-dependencies"]["discord"] = ["discord-disnake"]

pyproject.toml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: MIT
22

33
[build-system]
4-
requires = ["setuptools>=61"]
5-
build-backend = "setuptools.build_meta"
4+
requires = ["hatchling", "hatch-vcs"]
5+
build-backend = "hatchling.build"
66

77
[project]
88
name = "disnake"
@@ -119,6 +119,23 @@ setup_env = { cmd = "{pdm} install -G:all", help = "Set up the local environment
119119
post_setup_env = { composite = ["python -m ensurepip --default-pip", "pre-commit install --install-hooks"] }
120120
test = { cmd = "nox -Rs test --", help = "Run pytest" }
121121

122+
# legacy tasks for those who still type `task`
123+
[tool.taskipy.tasks]
124+
docs = { cmd = "docs", help = "Build the documentation for development" }
125+
lint = { cmd = "lint", help = "Check all files for linting errors" }
126+
pyright = { cmd = "pyright", help = "Run pyright" }
127+
setup_env = { cmd = "setup_env", help = "Setup the local environment and set up all dependencies" }
128+
test = { cmd = "test", help = "Run pytest" }
129+
130+
[tool.hatch.build]
131+
include = [
132+
"disnake/",
133+
]
134+
135+
[tool.hatch.version]
136+
source = "vcs"
137+
fallback-version = "0.0.0"
138+
122139
[tool.ruff]
123140
line-length = 100
124141
target-version = "py38"

setup.py

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

0 commit comments

Comments
 (0)