1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-23 19:55:38 +01:00

setup: hard error if someone trying to install it on python2

This commit is contained in:
Johan Andersson 2018-05-24 23:50:55 +02:00
parent 00b7ae81d9
commit 3f2b94d154

View File

@ -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)