Skip to content

Commit 274eaf6

Browse files
committed
Use scm for version
1 parent 5806322 commit 274eaf6

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pyproject.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
# Project build file
22

33
[build-system]
4-
requires = ['setuptools']
4+
requires = ['setuptools', 'setuptools-scm>=8']
55
build-backend = 'setuptools.build_meta'
66
[tool.setuptools.packages.find]
77
where = ["src"]
88
[tool.setuptools.package-data]
99
tol_colors = ["colors.json"]
10+
[tool.setuptools_scm]
1011

1112
[project]
12-
version = '2.0.0.post1'
13+
dynamic = ['version']
1314

1415
name = 'tol_colors'
1516
authors = [

src/tol_colors/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
# ruff: noqa: N815, N816
1111

1212
import functools
13+
import importlib.metadata
1314
import json
1415
import logging
1516
import os
@@ -22,7 +23,7 @@
2223
import matplotlib
2324
from matplotlib.colors import LinearSegmentedColormap, ListedColormap
2425

25-
__version__ = "2.0.0"
26+
__version__ = importlib.metadata.version("tol_colors")
2627

2728
log = logging.getLogger(__name__)
2829

0 commit comments

Comments
 (0)