1
0
mirror of https://github.com/mnaberez/py65.git synced 2024-11-19 06:31:08 +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 sys
if sys.version_info[:2] < (2, 6):
msg = ("Py65 requires Python 2.6 or later, you are attempting to "
"install it using version %s. Please install with a "
"supported version" % sys.version)
sys.stderr.write(msg)
sys.exit(1)
py_version = sys.version_info[:2]
PY3 = py_version[0] == 3
if PY3:
if py_version < (3, 2):
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
here = os.path.abspath(os.path.dirname(__file__))