1
0
mirror of https://github.com/janeczku/calibre-web synced 2025-01-02 21:40:30 +00:00

Fix for dependency check on python versions <3.10

This commit is contained in:
Ozzie Isaacs 2024-11-05 16:48:03 +01:00 committed by GitHub
parent d6798fb286
commit 4c3fc90830
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,8 +46,9 @@ def load_dependencies(optional=False):
dep_version = exe_deps[res.group(1).lower().replace('_', '-')]
else:
if res.group(6) and res.group(7):
if not eval(str(sys.version_info[0]) + "." + str(sys.version_info[1]) +
res.group(6)+ res.group(7)):
val = res.group(7).split(".")
if not eval(str(sys.version_info[0]) + "." + "{:02d}".format(sys.version_info[1]) +
res.group(6) + val[0] + "." + "{:02d}".format(int(val[1]))):
continue
if importlib:
dep_version = version(res.group(1))