Skip to content

Commit cc81632

Browse files
authored
Use hatch backend (#265)
1 parent 5b17eca commit cc81632

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

jupyter_core/version.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
VersionInfo = namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"])
77

88
version_info = VersionInfo(4, 10, 0, "final", 0)
9+
__version__ = "4.10.0"
910

1011
_specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": "", "dev": "dev"}
1112

@@ -16,4 +17,4 @@
1617
else:
1718
_suffix_ = f"{_specifier_[version_info.releaselevel]}{version_info.serial}"
1819

19-
__version__ = f"{version_info.major}.{version_info.minor}.{version_info.micro}{_suffix_}"
20+
assert __version__ == f"{version_info.major}.{version_info.minor}.{version_info.micro}{_suffix_}"

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[build-system]
2-
requires = ["flit_core >=3.2,<4"]
3-
build-backend = "flit_core.buildapi"
2+
requires = ["hatchling>=0.25"]
3+
build-backend = "hatchling.build"
44

55
[project]
66
name = "jupyter_core"
@@ -51,6 +51,9 @@ jupyter = "jupyter_core.command:main"
5151
jupyter-migrate = "jupyter_core.migrate:main"
5252
jupyter-troubleshoot = "jupyter_core.troubleshoot:main"
5353

54+
[tool.hatch.version]
55+
path = "jupyter_core/version.py"
56+
5457
[tool.mypy]
5558
check_untyped_defs = true
5659
disallow_any_generics = false

0 commit comments

Comments
 (0)