Skip to content

Commit

Permalink
Update version to use setuptools-scm (#25)
Browse files Browse the repository at this point in the history
  • Loading branch information
jsignell authored Jul 16, 2023
1 parent 3c9bb02 commit beef8c0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[build-system]
requires = ["setuptools>=61.0"]
requires = ["setuptools>=61.0", "setuptools_scm[toml]>=6.2"]
build-backend = "setuptools.build_meta"

[tool.setuptools_scm]

[project]
name = "xpystac"
authors = [
Expand Down
8 changes: 7 additions & 1 deletion xpystac/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,7 @@
__version__ = "0.1.2"
from importlib.metadata import PackageNotFoundError, version

try:
__version__ = version("xpystac")
except PackageNotFoundError: # noqa
# package is not installed
pass

0 comments on commit beef8c0

Please sign in to comment.