py2_warn.py 396 B

12345678910111213141516
  1. import sys
  2. import warnings
  3. import textwrap
  4. msg = textwrap.dedent("""
  5. Encountered a version of Setuptools that no longer supports
  6. this version of Python. Please head to
  7. https://bit.ly/setuptools-py2-sunset for support.
  8. """)
  9. pre = "Setuptools no longer works on Python 2\n"
  10. if sys.version_info < (3,):
  11. warnings.warn(pre + "*" * 60 + msg + "*" * 60)
  12. raise SystemExit(32)