Skip to content

Commit

Permalink
MNT: Add error message to setup.py for old Python
Browse files Browse the repository at this point in the history
  • Loading branch information
dopplershift committed Nov 17, 2021
1 parent e6186c1 commit 1da5e8f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@
import versioneer


if sys.version_info[0] < 3:
error = """
Siphon greater than 0.9 requires Python 3.7 or above.
If you're using Python 2.7, please install Siphon v0.9.0,
which is the last release that supports Python 2.7,
though it is no longer maintained.
Python {py} detected.
""".format(py='.'.join([str(v) for v in sys.version_info[:3]]))

print(error) # noqa: T001
sys.exit(1)

ver = versioneer.get_version()

# Need to conditionally add enum support for older Python
Expand Down

0 comments on commit 1da5e8f

Please sign in to comment.