Skip to content

Commit

Permalink
Compare installed Python version with Calibre's Python version
Browse files Browse the repository at this point in the history
Don't support Python older than the calibre's version.
  • Loading branch information
xxyzz committed Dec 31, 2023
1 parent 348b3d3 commit 3010293
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion deps.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ def which_python() -> tuple[str, str]:
py_v = r.stdout.decode().strip()
else:
py_v = ".".join(platform.python_version_tuple()[:2])
if list(map(int, py_v.split("."))) < [3, 10]:
if tuple(py_v.split(".")) < platform.python_version_tuple()[:2]:
raise Exception("OutdatedPython")
return py, py_v

Expand Down

0 comments on commit 3010293

Please sign in to comment.