matrix-alertbot/matrix_alertbot/__init__.py

14 lines
363 B
Python
Raw Normal View History

2020-08-06 22:16:57 +02:00
import sys
from importlib.metadata import PackageNotFoundError, version
2020-08-06 22:16:57 +02:00
# Check that we're not running on an unsupported Python version.
if sys.version_info < (3, 9):
print("matrix_alertbot requires Python 3.9 or above.")
2020-08-06 22:16:57 +02:00
sys.exit(1)
try:
__version__ = version("matrix_alertbot")
except PackageNotFoundError:
# package is not installed
pass