chia-blockchain/chia/__init__.py
Kyle Altendorf 302e7e7f81
use importlib.metadata to get package versions (#14753)
* use importlib_metadata to get package versions

* ignore untyped call

* stop ignoring the deprecation warning

* Revert "stop ignoring the deprecation warning"

This reverts commit 931fe8c794.

* include chiapos version data

* tweak
2023-09-27 15:01:08 -05:00

11 lines
256 B
Python

from __future__ import annotations
import importlib.metadata
__version__: str
try:
__version__ = importlib.metadata.version("chia-blockchain")
except importlib.metadata.PackageNotFoundError:
# package is not installed
__version__ = "unknown"