mirror of
https://github.com/mnaberez/py65.git
synced 2024-12-30 13:29:18 +00:00
Check for supported Python 3 versions on install
This commit is contained in:
parent
497af00356
commit
b73bffe4d2
15
setup.py
15
setup.py
@ -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__))
|
||||
|
Loading…
Reference in New Issue
Block a user