Skip to content

Commit

Permalink
Merge 0926036 into 3162c15
Browse files Browse the repository at this point in the history
  • Loading branch information
hluk committed Mar 7, 2024
2 parents 3162c15 + 0926036 commit 097a648
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion waiverdb/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,17 @@
# SPDX-License-Identifier: GPL-2.0+
__version__ = '1.4.0'
import importlib.metadata as importlib_metadata

try:
__version__ = importlib_metadata.version(__name__)
except importlib_metadata.PackageNotFoundError:
# If the app is not installed but run from git repository clone, get the
# version from pyproject.toml.
try:
import tomllib
except ImportError:
import toml as tomllib # type: ignore

with open("pyproject.toml", "r") as f:
pyproject = tomllib.load(f) # type: ignore

__version__ = pyproject["tool"]["poetry"]["version"]

0 comments on commit 097a648

Please sign in to comment.