8000 Backport PR #16394: Mark inkscape 1.0 as unsupported (at least for now). · matplotlib/matplotlib@4fe1e3b · GitHub
[go: up one dir, main page]

Skip to content

Commit 4fe1e3b

Browse files
tacaswellmeeseeksmachine
authored andcommitted
Backport PR #16394: Mark inkscape 1.0 as unsupported (at least for now).
1 parent 4882df5 commit 4fe1e3b

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
@@ -28,7 +28,7 @@ The following software is required to run the tests:
2828

2929
- pytest_ (>=3.6)
3030
- Ghostscript_ (>= 9.0, to render PDF files)
31-
- Inkscape_ (to render SVG files)
31+
- Inkscape_ (<1.0, to render SVG files)
3232

3333
Optionally you can install:
3434

lib/matplotlib/__init__.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
345345
if min_ver is not None and version < min_ver:
346346
raise ExecutableNotFoundError(
347347
f"You have {args[0]} version {version} but the minimum "
348-
f"version supported by Matplotlib is {min_ver}.")
348+
f"version supported by Matplotlib is {min_ver}")
349349
return _ExecInfo(args[0], version)
350350
else:
351351
raise ExecutableNotFoundError(
@@ -366,7 +366,12 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
366366
message = "Failed to find a Ghostscript installation"
367367
raise ExecutableNotFoundError(message)
368368
elif name == "inkscape":
369-
return impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
369+
info = impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
370+
if info and info.version >= "1.0":
371+
raise ExecutableNotFoundError(
372+
f"You have Inkscape version {info.version} but Matplotlib "
373+
f"only supports Inkscape<1.0")
374+
return info
370375
elif name == "magick":
371376
path = None
372377
if sys.platform == "win32":
@@ -403,7 +408,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
403408
or "0.9" <= info.version <= "1.0"):
404409
raise ExecutableNotFoundError(
405410
f"You have pdftops version {info.version} but the minimum "
406-
f"version supported by Matplotlib is 3.0.")
411+
f"version supported by Matplotlib is 3.0")
407412
return info
408413
else:
409414
raise ValueError("Unknown executable: {!r}".format(name))

0 commit comments

Comments
 (0)
0