summaryrefslogtreecommitdiff
path: root/pkg_resources/py2_warn.py
blob: 00cc8bc75d38371576805107806725cee59afa78 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys
import warnings
import textwrap


msg = textwrap.dedent("""
    Encountered a version of Setuptools that no longer supports
    this version of Python. Please head to
    https://bit.ly/setuptools-py2-warning for support.
    """)

pre = "Setuptools no longer works on Python 2\n"

if sys.version_info < (3,):
    warnings.warn(pre + "*" * 60 + msg + "*" * 60)
    raise SystemExit(32)