mirror of
https://github.com/Chia-Network/chia-blockchain.git
synced 2024-08-16 14:20:47 +03:00
* 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
11 lines
256 B
Python
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"
|