From e6a830e87e5009ae8ee367666f575bfb96336812 Mon Sep 17 00:00:00 2001 From: Steven Silvester Date: Wed, 21 Sep 2022 19:45:09 -0500 Subject: [PATCH] use hatch for version --- RELEASE.md | 10 +++++----- ipykernel/_version.py | 2 +- pyproject.toml | 22 ++++------------------ 3 files changed, 10 insertions(+), 24 deletions(-) diff --git a/RELEASE.md b/RELEASE.md index 2f3954582..1253d50d9 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -12,14 +12,14 @@ The recommended way to make a release is to use [`jupyter_releaser`](https://git ```bash export VERSION= -pip install jupyter_releaser -tbump --only-patch $VERSION +pip install pipx +pipx run hatch version $VERSION git commit -a -m "Release $VERSION" git tag $VERSION; true; git push --all git push --tags rm -rf dist build -python -m build . -twine check dist/* -twine upload dist/* +pipx run build . +pipx run twine check dist/* +pipx run twine upload dist/* ``` diff --git a/ipykernel/_version.py b/ipykernel/_version.py index 11d21c6be..defb7bf26 100644 --- a/ipykernel/_version.py +++ b/ipykernel/_version.py @@ -4,7 +4,7 @@ import re from typing import List -# Version string must appear intact for tbump versioning +# Version string must appear intact for hatch versioning __version__ = "6.15.3" # Build up version_info tuple for backwards compatibility diff --git a/pyproject.toml b/pyproject.toml index 40ae2266a..b5ae8015a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "hatchling.build" [project] name = "ipykernel" -version = "6.15.3" +dynamic = ["version"] authors = [{name = "IPython Development Team", email = "ipython-dev@scipy.org"}] license = {file = "COPYING.md"} readme = "README.md" @@ -48,6 +48,9 @@ test = [ "pytest-timeout", ] +[tool.hatch.version] +path = "ipykernel/_version.py" + # Used to call hatch_build.py [tool.hatch.build.hooks.custom] @@ -60,23 +63,6 @@ test = [ [tool.jupyter-releaser] skip = ["check-links"] -[tool.tbump.version] -current = "6.15.3" -regex = ''' - (?P\d+)\.(?P\d+)\.(?P\d+) - ((?Pa|b|rc|.dev)(?P\d+))? -''' - -[tool.tbump.git] -message_template = "Bump to {new_version}" -tag_template = "v{new_version}" - -[[tool.tbump.file]] -src = "ipykernel/_version.py" - -[[tool.tbump.file]] -src = "pyproject.toml" - [tool.mypy] check_untyped_defs = true disallow_any_generics = true