Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 083c788

Browse files
committed
Merge pull request #2240 from mdboom/update-pyparsing-version-requirement
Upgrade requirement to pyparsing 2.0.1
2 parents 6846892 + 28c5d1a commit 083c788

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

setupext.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -972,13 +972,19 @@ def check(self):
972972

973973
if sys.version_info[0] >= 3:
974974
required = [2, 0, 0]
975+
if [int(x) for x in pyparsing.__version__.split('.')] < required:
976+
return (
977+
"matplotlib requires pyparsing >= {0} on Python 3.x".format(
978+
'.'.join(str(x) for x in required)))
975979
else:
976980
required = [1, 5, 6]
977-
if [int(x) for x in pyparsing.__version__.split('.')] < required:
978-
return (
979-
"matplotlib requires pyparsing >= {0} on Python {1}".format(
980-
'.'.join(str(x) for x in required),
981-
sys.version_info[0]))
981+
if [int(x) for x in pyparsing.__version__.split('.')] < required:
982+
return (
983+
"matplotlib requires pyparsing >= {0} on Python 2.x".format(
984+
'.'.join(str(x) for x in required)))
985+
if pyparsing.__version__ == "2.0.0":
986+
return (
987+
"pyparsing 2.0.0 is not compatible with Python 2.x")
982988

983989
return "using pyparsing version %s" % pyparsing.__version__
984990

@@ -987,7 +993,7 @@ def get_install_requires(self):
987993
return ['pyparsing>=1.5.6']
988994
else:
989995
# pyparsing >= 2.0.0 is not compatible with Python 2
990-
return ['pyparsing>=1.5.6,<2.0.0']
996+
return ['pyparsing>=1.5.6,!=2.0.0']
991997

992998

993999
class BackendAgg(OptionalBackendPackage):

0 commit comments

Comments
 (0)