From 3f2b94d154d98d04647c8190d8e33b94e606d568 Mon Sep 17 00:00:00 2001 From: Johan Andersson Date: Thu, 24 May 2018 23:50:55 +0200 Subject: [PATCH] setup: hard error if someone trying to install it on python2 --- setup.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/setup.py b/setup.py index 888a712..4ce8c60 100644 --- a/setup.py +++ b/setup.py @@ -5,6 +5,10 @@ import os srcdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "lib/") sys.path.insert(0, srcdir) +vi = sys.version_info +if vi < (3, 4): + raise RuntimeError('svtplay-dl requires Python 3.4 or greater') + about = {} with open(os.path.join(srcdir, 'svtplay_dl', '__version__.py'), 'r') as f: exec(f.read(), about)