Skip to content

Commit 686aec9

Browse files
committed
✨ Move to hatch for build backend
1 parent 3ba0581 commit 686aec9

File tree

3 files changed

+15
-10
lines changed

3 files changed

+15
-10
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ tests/bluemira/test_generated_data
190190
cross_section_data
191191
plasmod_*.dat
192192
tmp_env.yml
193+
bluemira/_version.py
193194

194195
# openmc outputs
195196
*.svg

bluemira/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@
1313
try:
1414
__version__ = version("bluemira")
1515
except PackageNotFoundError:
16-
from setuptools_scm import get_version
17-
18-
__version__ = get_version()
16+
__version__ = "0.0.0.Unknown"

pyproject.toml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@ description = """An integrated inter-disciplinary design tool for future fusion
88
readme = "README.md"
99
requires-python = ">=3.10"
1010
dynamic = ['version']
11+
license = "LGPL-2.1-or-later"
1112
classifiers = [
1213
"Development Status :: 5 - Production/Stable",
1314
"Programming Language :: Python :: 3",
14-
"License :: OSI Approved :: GNU Lesser General Public License v2.1 or later (LGPLv2.1+)",
15+
"License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)",
1516
"Operating System :: POSIX :: Linux",
1617
]
18+
1719
dependencies = [
1820
"anytree>=2.5",
1921
"asteval>=1.0",
@@ -101,14 +103,18 @@ dagmc = [
101103
]
102104

103105
[build-system]
104-
requires = ["setuptools>=62", "setuptools_scm[toml]>=7.0"]
106+
requires = ["hatchling", "hatch-vcs"]
107+
build-backend = "hatchling.build"
108+
109+
[tool.hatch.version]
110+
source = "vcs"
111+
fallback-version = "0.0.0"
105112

106-
[tool.setuptools.packages.find]
107-
where = ["."]
108-
include = ["bluemira*"]
109-
exclude = ["tests*"]
113+
[tool.hatch.build.hooks.vcs]
114+
version-file = "bluemira/_version.py"
110115

111-
[tool.setuptools_scm]
116+
[tool.hatch.metadata]
117+
allow-direct-references = true # remove after reference published
112118

113119
[tool.coverage.report]
114120
"exclude_also" = [

0 commit comments

Comments
 (0)