From 9541f77f86519bfd7c5da9975ae49880ac1a6f87 Mon Sep 17 00:00:00 2001 From: desbma Date: Wed, 24 Jun 2015 00:24:53 +0200 Subject: [PATCH] Add Python version check in setup.py --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 0ce7a5e..8e5528a 100755 --- a/setup.py +++ b/setup.py @@ -3,10 +3,15 @@ import os import re +import sys from setuptools import find_packages, setup +if sys.hexversion < 0x3030000: + print("Python version %s is unsupported, >= 3.3.0 is needed" % (".".join(map(str, sys.version_info[:3])))) + exit(1) + with open(os.path.join("hddfancontrol", "__init__.py"), "rt") as f: version = re.search("__version__ = \"([^\"]+)\"", f.read()).group(1)