Skip to content

Commit 56db684

Browse files
committed
MNT: Switch to hatch build backend
1 parent 02c7a34 commit 56db684

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

pyproject.toml

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["setuptools", "setuptools_scm[toml]>=6.2"]
3-
build-backend = "setuptools.build_meta"
2+
requires = ["hatchling", "hatch-vcs"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "nibabel"
@@ -70,13 +70,22 @@ test = [
7070
]
7171
zstd = ["pyzstd >= 0.14.3"]
7272

73-
[tool.setuptools]
74-
platforms = ["OS Independent"]
75-
provides = ["nibabel", "nisext"]
76-
zip-safe = false
73+
[tool.hatch.build.targets.sdist]
74+
exclude = [".git_archival.txt"]
7775

78-
[tool.setuptools.packages.find]
79-
include = ["nibabel*", "nisext*"]
76+
[tool.hatch.build.targets.wheel]
77+
packages = ["nibabel", "nisext"]
78+
exclude = [
79+
# 56MB test file does not need to be installed everywhere
80+
"nibabel/nicom/tests/data/4d_multiframe_test.dcm",
81+
]
82+
83+
[tool.hatch.version]
84+
source = "vcs"
85+
raw-options = { version_scheme = "release-branch-semver" }
86+
87+
[tool.hatch.build.hooks.vcs]
88+
version-file = "nibabel/_version.py"
8089

8190
[tool.blue]
8291
line_length = 99
@@ -93,6 +102,3 @@ force-exclude = """
93102
profile = "black"
94103
line_length = 99
95104
extend_skip = ["_version.py", "externals"]
96-
97-
[tool.setuptools_scm]
98-
write_to = "nibabel/_version.py"

0 commit comments

Comments
 (0)