From d62d9dc2e62e35a77f910c0ae65c2cd4d8705e4f Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 10 Sep 2018 15:57:25 +0530 Subject: [PATCH] Allow setup.py to be run with python3 --- setup.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/setup.py b/setup.py index 877de94fae..acbf73cc8f 100755 --- a/setup.py +++ b/setup.py @@ -13,6 +13,9 @@ 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 + return raise SystemExit( 'calibre requires python >= 2.7.9 and < 3. Current python version: %s' % vi)