Skip to content

Commit c562f28

Browse files
committed
Give a more useful error message than a SyntaxError on old setuptools
1 parent 21aabd6 commit c562f28

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

setup.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
from __future__ import print_function
2+
13
import ast
24
import codecs
5+
import sys
36

47
from os.path import join, dirname
5-
from setuptools import setup, find_packages
8+
from setuptools import setup, find_packages, __version__ as setuptools_version
9+
from pkg_resources import parse_version
610

11+
if parse_version(setuptools_version) < parse_version("18.5"):
12+
print("html5lib requires setuptools version 18.5 or above; "
13+
"please upgrade before installing (you have %s)" % setuptools_version)
14+
sys.exit(1)
715

816
classifiers = [
917
'Development Status :: 5 - Production/Stable',

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy