From 28c5d1a2d647cc8d3a54dc83e36dce86deb1de54 Mon Sep 17 00:00:00 2001 From: Michael Droettboom Date: Tue, 23 Jul 2013 08:56:15 -0400 Subject: [PATCH] Update pyparsing version requirement so that 2.0.1 is considered compatible with Python 2.x --- setupext.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/setupext.py b/setupext.py index 5f2bef485290..7058145ab497 100644 --- a/setupext.py +++ b/setupext.py @@ -972,13 +972,19 @@ def check(self): if sys.version_info[0] >= 3: required = [2, 0, 0] + if [int(x) for x in pyparsing.__version__.split('.')] < required: + return ( + "matplotlib requires pyparsing >= {0} on Python 3.x".format( + '.'.join(str(x) for x in required))) else: required = [1, 5, 6] - if [int(x) for x in pyparsing.__version__.split('.')] < required: - return ( - "matplotlib requires pyparsing >= {0} on Python {1}".format( - '.'.join(str(x) for x in required), - sys.version_info[0])) + if [int(x) for x in pyparsing.__version__.split('.')] < required: + return ( + "matplotlib requires pyparsing >= {0} on Python 2.x".format( + '.'.join(str(x) for x in required))) + if pyparsing.__version__ == "2.0.0": + return ( + "pyparsing 2.0.0 is not compatible with Python 2.x") return "using pyparsing version %s" % pyparsing.__version__ @@ -987,7 +993,7 @@ def get_install_requires(self): return ['pyparsing>=1.5.6'] else: # pyparsing >= 2.0.0 is not compatible with Python 2 - return ['pyparsing>=1.5.6,<2.0.0'] + return ['pyparsing>=1.5.6,!=2.0.0'] class BackendAgg(OptionalBackendPackage):