1
0
mirror of https://github.com/mnaberez/py65.git synced 2025-01-04 16:30:42 +00:00

Check for supported Python 3 versions on install

This commit is contained in:
Mike Naberezny 2013-10-26 18:41:33 -07:00
parent 497af00356
commit b73bffe4d2

View File

@ -3,12 +3,15 @@ __version__ = '0.17-dev'
import os import os
import sys import sys
if sys.version_info[:2] < (2, 6): py_version = sys.version_info[:2]
msg = ("Py65 requires Python 2.6 or later, you are attempting to " PY3 = py_version[0] == 3
"install it using version %s. Please install with a "
"supported version" % sys.version) if PY3:
sys.stderr.write(msg) if py_version < (3, 2):
sys.exit(1) raise RuntimeError('On Python 3, Py65 requires Python 3.2 or later')
else:
if py_version < (2, 6):
raise RuntimeError('On Python 2, Py65 requires Python 2.6 or later')
from setuptools import setup, find_packages from setuptools import setup, find_packages
here = os.path.abspath(os.path.dirname(__file__)) here = os.path.abspath(os.path.dirname(__file__))