Skip to content

Commit

Permalink
Fail if we try to install on an unsupported Python version.
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigc committed Dec 18, 2017
1 parent a953836 commit 2db13e9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

if __name__ == "__main__":

if sys.version_info < (2, 7):
raise ImportError("Twisted requires Python 2.7 or later.")
elif sys.version_info >= (3, 0) and sys.version_info < (3, 4):
raise ImportError("Twisted on Python 3 requires Python 3.4 or later.")
_setup = {}
with open('src/twisted/python/_setup.py') as f:
exec(f.read(), _setup)
Expand Down

0 comments on commit 2db13e9

Please sign in to comment.