Skip to content

Commit 4d8c846

Browse files
committed
Fix pyparsing on python 3 check
1 parent 49bd70a commit 4d8c846

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
raise ImportError("matplotlib requires pyparsing")
116116
else:
117117
if sys.version_info[0] >= 3:
118-
if [int(x) for x in pyparsing.__version__.split('.')] <= (1, 5, 6):
118+
if [int(x) for x in pyparsing.__version__.split('.')] <= [1, 5, 6]:
119119
raise ImportError(
120120
"matplotlib requires pyparsing > 1.5.6 on Python 3.x")
121121

setupext.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -836,6 +836,11 @@ def check(self):
836836
"support. pip/easy_install may attempt to install it "
837837
"after matplotlib.")
838838

839+
if sys.version_info[0] >= 3:
840+
if [int(x) for x in pyparsing.__version__.split('.')] <= [1, 5, 6]:
841+
return (
842+
"matplotlib requires pyparsing > 1.5.6 on Python 3.x")
843+
839844
return "using pyparsing version %s" % pyparsing.__version__
840845

841846
def get_install_requires(self):

0 commit comments

Comments
 (0)