Require python >= 3.7 in setup.py

This commit is contained in:
Kovid Goyal 2019-11-17 15:15:42 +05:30
parent 5bc5ab1307
commit b333c10301
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -11,13 +11,10 @@ import sys, os
def check_version_info():
vi = sys.version_info
if vi[0] == 2 and vi[1:3] >= (7, 9):
return
if vi.major > 2 and 'CALIBRE_PY3_PORT' in os.environ:
# PY3_TODO: Remove check for 'CALIBRE_PY3_PORT' once calibre works with python3
if vi.major > 3 or (vi.major == 3 and vi[1:3] >= (7, 0)):
return
raise SystemExit(
'calibre requires python >= 2.7.9 and < 3. Current python version: ' + '.'.join(map(str, vi[:3])))
'calibre requires python >= 3.7.0. Current python version: ' + '.'.join(map(str, vi[:3])))
check_version_info()