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 ]
66name = " nibabel"
@@ -70,13 +70,22 @@ test = [
7070]
7171zstd = [" 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 ]
8291line_length = 99
@@ -93,6 +102,3 @@ force-exclude = """
93102profile = " black"
94103line_length = 99
95104extend_skip = [" _version.py" , " externals" ]
96-
97- [tool .setuptools_scm ]
98- write_to = " nibabel/_version.py"
0 commit comments