@@ -278,7 +278,7 @@ def wrapper(**kwargs):
278278 return wrapper
279279
280280
281- _ExecInfo = namedtuple ("_ExecInfo" , "executable version" )
281+ _ExecInfo = namedtuple ("_ExecInfo" , "executable raw_version version" )
282282
283283
284284class ExecutableNotFoundError (FileNotFoundError ):
@@ -339,12 +339,13 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
339339 raise ExecutableNotFoundError (str (_ose )) from _ose
340340 match = re .search (regex , output )
341341 if match :
342- version = parse_version (match .group (1 ))
342+ raw_version = match .group (1 )
343+ version = parse_version (raw_version )
343344 if min_ver is not None and version < parse_version (min_ver ):
344345 raise ExecutableNotFoundError (
345346 f"You have { args [0 ]} version { version } but the minimum "
346347 f"version supported by Matplotlib is { min_ver } " )
347- return _ExecInfo (args [0 ], version )
348+ return _ExecInfo (args [0 ], raw_version , version )
348349 else :
349350 raise ExecutableNotFoundError (
350351 f"Failed to determine the version of { args [0 ]} from "
@@ -401,7 +402,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
401402 else :
402403 path = "convert"
403404 info = impl ([path , "--version" ], r"^Version: ImageMagick (\S*)" )
404- if info .version == parse_version ( "7.0.10-34" ) :
405+ if info .raw_version == "7.0.10-34" :
405406 # https://github.com/ImageMagick/ImageMagick/issues/2720
406407 raise ExecutableNotFoundError (
407408 f"You have ImageMagick { info .version } , which is unsupported" )
0 commit comments