|
1 | 1 | [build-system] |
2 | | -requires = [ |
3 | | - "setuptools>=64", |
4 | | - "setuptools_scm>=8", |
5 | | -] |
6 | | -build-backend = "setuptools.build_meta" |
7 | | - |
8 | | -[tool.setuptools_scm] |
9 | | -version_file = "templateflow/_version.py" |
10 | | -version_file_template = """\ |
11 | | -\"\"\"Version file, automatically generated by setuptools_scm.\"\"\" |
12 | | -__version__ = "{version}" |
13 | | -""" |
14 | | -fallback_version = "0.0" |
15 | | -# version_scheme = "nipreps-calver" |
| 2 | +requires = ["hatchling", "hatch-vcs", "nipreps-versions"] |
| 3 | +build-backend = "hatchling.build" |
16 | 4 |
|
17 | 5 | [project] |
18 | 6 | name = "templateflow" |
@@ -73,6 +61,32 @@ tests = ["templateflow[test]"] |
73 | 61 | docs = ["templateflow[doc]"] |
74 | 62 | all = ["templateflow[datalad,doc,test]"] |
75 | 63 |
|
| 64 | +# |
| 65 | +# Hatch configurations |
| 66 | +# |
| 67 | + |
| 68 | +[tool.hatch.metadata] |
| 69 | +allow-direct-references = true |
| 70 | + |
| 71 | +[tool.hatch.build.targets.sdist] |
| 72 | +exclude = [".git_archival.txt"] # No longer needed in sdist |
| 73 | + |
| 74 | +[tool.hatch.build.targets.wheel] |
| 75 | +packages = ["templateflow"] |
| 76 | +# exclude = [ |
| 77 | +# "templateflow/tests/data", # Large test data directory |
| 78 | +# ] |
| 79 | + |
| 80 | +## The following two sections configure setuptools_scm in the hatch way |
| 81 | + |
| 82 | +[tool.hatch.version] |
| 83 | +validate-bump = true |
| 84 | +source = "vcs" |
| 85 | +raw-options = { version_scheme = "nipreps-calver" } |
| 86 | + |
| 87 | +[tool.hatch.build.hooks.vcs] |
| 88 | +version-file = "templateflow/_version.py" |
| 89 | + |
76 | 90 | # |
77 | 91 | # Developer tool configurations |
78 | 92 | # |
|
0 commit comments