Skip to content

Commit beef8c0

Browse files
authored
Update version to use setuptools-scm (#25)
1 parent 3c9bb02 commit beef8c0

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

pyproject.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
[build-system]
2-
requires = ["setuptools>=61.0"]
2+
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"]
33
build-backend = "setuptools.build_meta"
44

5+
[tool.setuptools_scm]
6+
57
[project]
68
name = "xpystac"
79
authors = [

xpystac/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
1-
__version__ = "0.1.2"
1+
from importlib.metadata import PackageNotFoundError, version
2+
3+
try:
4+
__version__ = version("xpystac")
5+
except PackageNotFoundError: # noqa
6+
# package is not installed
7+
pass

0 commit comments

Comments
 (0)