Skip to content

Commit 09ca776

Browse files
committed
Add dynamic versioning
1 parent 8a4c070 commit 09ca776

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

pyproject.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "xarray_plotly"
3-
version = "0.0.1"
3+
dynamic = ["version"]
44
description = "Interactive Plotly Express plotting accessor for xarray"
55
readme = "README.md"
66
license = { text = "MIT" }
@@ -51,11 +51,14 @@ docs = [
5151
# Entry point for xarray to auto-register the accessor (xarray >= 2024.01)
5252

5353
[build-system]
54-
requires = ["hatchling"]
55-
build-backend = "hatchling.build"
54+
requires = ["setuptools>=61.0.0", "wheel", "setuptools_scm[toml]>=6.2"]
55+
build-backend = "setuptools.build_meta"
5656

57-
[tool.hatch.build.targets.wheel]
58-
packages = ["xarray_plotly"]
57+
[tool.setuptools.packages.find]
58+
include = ["xarray_plotly*"]
59+
60+
[tool.setuptools_scm]
61+
version_scheme = "post-release"
5962

6063
[tool.ruff]
6164
target-version = "py310"

xarray_plotly/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@
3636
"auto",
3737
]
3838

39-
__version__ = "0.1.0"
39+
from importlib.metadata import version
40+
41+
__version__ = version("xarray_plotly")
4042

4143
# Register the accessor
4244
register_dataarray_accessor("plotly")(DataArrayPlotlyAccessor)

0 commit comments

Comments
 (0)