Skip to content

Commit 2994841

Browse files
committed
[meta] Use hatchling to build package
1 parent dade7a3 commit 2994841

1 file changed

Lines changed: 24 additions & 11 deletions

File tree

pyproject.toml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
[build-system]
22
requires = [
3-
"setuptools >= 67.0",
4-
"setuptools-scm >= 8",
5-
"wheel",
3+
"hatchling",
4+
"versioningit",
65
]
7-
build-backend = "setuptools.build_meta"
6+
build-backend = "hatchling.build"
87

98
[project]
109
name = "coco-visualize"
@@ -25,6 +24,7 @@ classifiers = [
2524
"Programming Language :: Python :: 3.10",
2625
"Programming Language :: Python :: 3.11",
2726
"Programming Language :: Python :: 3.12",
27+
"Programming Language :: Python :: 3.13",
2828
"Programming Language :: Python :: Implementation :: CPython",
2929
]
3030
dependencies = [
@@ -35,12 +35,6 @@ dependencies = [
3535
]
3636
dynamic = ["version"]
3737

38-
[tool.setuptools_scm]
39-
version_file = "src/cocoviz/_version.py"
40-
41-
[tool.setuptools.packages.find]
42-
where = ["src"]
43-
4438
[tool.ruff]
4539
line-length = 120
4640

@@ -54,13 +48,32 @@ ignore = ["F821"]
5448

5549
[tool.pytest]
5650
log_cli = true
57-
addopts = "--doctest-modules"
51+
addopts = ["--doctest-modules"]
5852

5953
[tool.pyright]
6054
reportAny = false
6155
reportDeprecated = false
6256
reportUnusedCallResult = false
6357

58+
[tool.hatch.version]
59+
source = "versioningit"
60+
61+
[tool.hatch.build]
62+
artifacts = ["src/cocoviz/_version.py"]
63+
64+
[tool.hatch.build.targets.wheel]
65+
packages = ["src/cocoviz"]
66+
67+
[tool.hatch.build.targets.sdist]
68+
include = [
69+
"/src",
70+
"/tests",
71+
]
72+
exclude = ["/.gitignore"]
73+
74+
[tool.versioningit.write]
75+
file = "src/cocoviz/_version.py"
76+
6477
[dependency-groups]
6578
dev = [
6679
"cocopp>=2.8.0",

0 commit comments

Comments
 (0)