diff options
Diffstat (limited to 'pkg_resources/py2_warn.py')
| -rw-r--r-- | pkg_resources/py2_warn.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/pkg_resources/py2_warn.py b/pkg_resources/py2_warn.py new file mode 100644 index 00000000..6855aa24 --- /dev/null +++ b/pkg_resources/py2_warn.py @@ -0,0 +1,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-sunset 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) |
