Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c562f28

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

File tree

1 file changed

+9
-1
lines changed
Filter options

1 file changed

+9
-1
lines changed

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+9-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.