Skip to content

Commit

Permalink
Let setup.py show better error on Python 3.7
Browse files Browse the repository at this point in the history
  • Loading branch information
niklasf committed Jul 27, 2023
1 parent 179b6f3 commit bab7665
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
end of 2018. Consider upgrading to Python 3.
"""))

if sys.version_info < (3, 7):
raise ImportError("Since version 1.0.0, python-chess requires Python 3.7 or later.")
if sys.version_info < (3, 8):
raise ImportError(textwrap.dedent("""\
You are trying to install python-chess.
Since version 1.11.0, python-chess requires Python 3.8 or later.
Since version 1.0.0, python-chess requires Python 3.7 or later.
"""))

import chess

Expand Down

0 comments on commit bab7665

Please sign in to comment.