From 1bca05e01a04cc8ce0a5d52c78c0901ad92161ae 2013-09-09 18:13:28 From: MinRK Date: 2013-09-09 18:13:28 Subject: [PATCH] update version-check message in setup.py and IPython.__init__ clearer message that IPython no longer supports 2.6. --- diff --git a/IPython/__init__.py b/IPython/__init__.py index 55f6f60..b8956fe 100644 --- a/IPython/__init__.py +++ b/IPython/__init__.py @@ -28,8 +28,8 @@ import sys #----------------------------------------------------------------------------- # Don't forget to also update setup.py when this changes! -if sys.version[0:3] < '2.6': - raise ImportError('Python Version 2.6 or above is required for IPython.') +if sys.version_info[:2] < (2,7): + raise ImportError('IPython requires Python Version 2.7 or above.') # Make it easy to import extensions - they are always directly on pythonpath. # Therefore, non-IPython modules can be added to extensions directory. diff --git a/setup.py b/setup.py index 48e2b00..f8ab76a 100755 --- a/setup.py +++ b/setup.py @@ -26,12 +26,10 @@ import sys # This check is also made in IPython/__init__, don't forget to update both when # changing Python version requirements. -#~ if sys.version[0:3] < '2.6': - #~ error = """\ -#~ ERROR: 'IPython requires Python Version 2.6 or above.' -#~ Exiting.""" - #~ print >> sys.stderr, error - #~ sys.exit(1) +if sys.version_info[:2] < (2,7): + error = "ERROR: IPython requires Python Version 2.7 or above." + print(error, file=sys.stderr) + sys.exit(1) PY3 = (sys.version_info[0] >= 3)