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

Skip to content

Commit 06d358c

Browse files
committed
Mark inkscape 1.0 as unsupported (at least for now).
The command line args changed completely so _SVGConverter would need to be rewritted first.
1 parent b47fc9d commit 06d358c

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

doc/devel/testing.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ The following software is required to run the tests:
2727

2828
- pytest_ (>=3.6)
2929
- Ghostscript_ (>= 9.0, to render PDF files)
30-
- Inkscape_ (to render SVG files)
30+
- Inkscape_ (<1.0, to render SVG files)
3131

3232
Optionally you can install:
3333

lib/matplotlib/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
309309
if min_ver is not None and version < min_ver:
310310
raise ExecutableNotFoundError(
311311
f"You have {args[0]} version {version} but the minimum "
312-
f"version supported by Matplotlib is {min_ver}.")
312+
f"version supported by Matplotlib is {min_ver}")
313313
return _ExecInfo(args[0], version)
314314
else:
315315
raise ExecutableNotFoundError(
@@ -330,7 +330,12 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
330330
message = "Failed to find a Ghostscript installation"
331331
raise ExecutableNotFoundError(message)
332332
elif name == "inkscape":
333-
return impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
333+
info = impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
334+
if info and info.version >= "1.0":
335+
raise ExecutableNotFoundError(
336+
f"You have Inkscape version {info.version} but Matplotlib "
337+
f"only supports Inkscape<1.0")
338+
return info
334339
elif name == "magick":
335340
path = None
336341
if sys.platform == "win32":
@@ -367,7 +372,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
367372
or "0.9" <= info.version <= "1.0"):
368373
raise ExecutableNotFoundError(
369374
f"You have pdftops version {info.version} but the minimum "
370-
f"version supported by Matplotlib is 3.0.")
375+
f"version supported by Matplotlib is 3.0")
371376
return info
372377
else:
373378
raise ValueError("Unknown executable: {!r}".format(name))

0 commit comments

Comments
 (0)