mirror of
https://github.com/morpheus65535/bazarr.git
synced 2024-11-10 09:02:44 +08:00
15 lines
452 B
Python
15 lines
452 B
Python
import sys
|
|
if sys.version_info >= (3, 8):
|
|
import importlib.metadata as importlib_metadata
|
|
else:
|
|
import importlib_metadata
|
|
|
|
|
|
try:
|
|
release = importlib_metadata.version('APScheduler').split('-')[0]
|
|
except importlib_metadata.PackageNotFoundError:
|
|
release = '3.5.0'
|
|
|
|
version_info = tuple(int(x) if x.isdigit() else x for x in release.split('.'))
|
|
version = __version__ = '.'.join(str(x) for x in version_info[:3])
|
|
del sys, importlib_metadata
|