@@ -278,7 +278,7 @@ def wrapper(**kwargs):
278
278
return wrapper
279
279
280
280
281
- _ExecInfo = namedtuple ("_ExecInfo" , "executable version" )
281
+ _ExecInfo = namedtuple ("_ExecInfo" , "executable raw_version version" )
282
282
283
283
284
284
class ExecutableNotFoundError (FileNotFoundError ):
@@ -339,12 +339,13 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
339
339
raise ExecutableNotFoundError (str (_ose )) from _ose
340
340
match = re .search (regex , output )
341
341
if match :
342
- version = parse_version (match .group (1 ))
342
+ raw_version = match .group (1 )
343
+ version = parse_version (raw_version )
343
344
if min_ver is not None and version < parse_version (min_ver ):
344
345
raise ExecutableNotFoundError (
345
346
f"You have { args [0 ]} version { version } but the minimum "
346
347
f"version supported by Matplotlib is { min_ver } " )
347
- return _ExecInfo (args [0 ], version )
348
+ return _ExecInfo (args [0 ], raw_version , version )
348
349
else :
349
350
raise ExecutableNotFoundError (
350
351
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):
401
402
else :
402
403
path = "convert"
403
404
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" :
405
406
# https://github.com/ImageMagick/ImageMagick/issues/2720
406
407
raise ExecutableNotFoundError (
407
408
f"You have ImageMagick { info .version } , which is unsupported" )
0 commit comments