From cc8163296ecaa3d9e35d2716dbb75b51be28529e Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Tue, 17 May 2022 10:39:52 -0500 Subject: [PATCH] Use hatch backend (#265) --- jupyter_core/version.py | 3 ++- pyproject.toml | 7 +++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/jupyter_core/version.py b/jupyter_core/version.py index 065e4df..b591af0 100644 --- a/jupyter_core/version.py +++ b/jupyter_core/version.py @@ -6,6 +6,7 @@ VersionInfo = namedtuple("VersionInfo", ["major", "minor", "micro", "releaselevel", "serial"]) version_info = VersionInfo(4, 10, 0, "final", 0) +__version__ = "4.10.0" _specifier_ = {"alpha": "a", "beta": "b", "candidate": "rc", "final": "", "dev": "dev"} @@ -16,4 +17,4 @@ else: _suffix_ = f"{_specifier_[version_info.releaselevel]}{version_info.serial}" -__version__ = f"{version_info.major}.{version_info.minor}.{version_info.micro}{_suffix_}" +assert __version__ == f"{version_info.major}.{version_info.minor}.{version_info.micro}{_suffix_}" diff --git a/pyproject.toml b/pyproject.toml index 8dd6d7a..7826b15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [build-system] -requires = ["flit_core >=3.2,<4"] -build-backend = "flit_core.buildapi" +requires = ["hatchling>=0.25"] +build-backend = "hatchling.build" [project] name = "jupyter_core" @@ -51,6 +51,9 @@ jupyter = "jupyter_core.command:main" jupyter-migrate = "jupyter_core.migrate:main" jupyter-troubleshoot = "jupyter_core.troubleshoot:main" +[tool.hatch.version] +path = "jupyter_core/version.py" + [tool.mypy] check_untyped_defs = true disallow_any_generics = false