Skip to content

Commit

Permalink
update version-check message in setup.py and IPython.__init__
Browse files Browse the repository at this point in the history
clearer message that IPython no longer supports 2.6.
  • Loading branch information
minrk committed Sep 9, 2013
1 parent 8c88aec commit 1bca05e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
4 changes: 2 additions & 2 deletions IPython/__init__.py
Expand Up @@ -28,8 +28,8 @@
#-----------------------------------------------------------------------------

# 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.
Expand Down
10 changes: 4 additions & 6 deletions setup.py
Expand Up @@ -26,12 +26,10 @@

# 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)

Expand Down

0 comments on commit 1bca05e

Please sign in to comment.