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

Skip to content

Mark inkscape 1.0 as unsupported (at least for now). #16394

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/devel/testing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ The following software is required to run the tests:

- pytest_ (>=3.6)
- Ghostscript_ (>= 9.0, to render PDF files)
- Inkscape_ (to render SVG files)
- Inkscape_ (<1.0, to render SVG files)

Optionally you can install:

Expand Down
11 changes: 8 additions & 3 deletions lib/matplotlib/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
if min_ver is not None and version < min_ver:
raise ExecutableNotFoundError(
f"You have {args[0]} version {version} but the minimum "
f"version supported by Matplotlib is {min_ver}.")
f"version supported by Matplotlib is {min_ver}")
return _ExecInfo(args[0], version)
else:
raise ExecutableNotFoundError(
Expand All @@ -330,7 +330,12 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
message = "Failed to find a Ghostscript installation"
raise ExecutableNotFoundError(message)
elif name == "inkscape":
return impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
info = impl(["inkscape", "-V"], "^Inkscape ([^ ]*)")
if info and info.version >= "1.0":
raise ExecutableNotFoundError(
f"You have Inkscape version {info.version} but Matplotlib "
f"only supports Inkscape<1.0")
return info
elif name == "magick":
path = None
if sys.platform == "win32":
Expand Down Expand Up @@ -367,7 +372,7 @@ def impl(args, regex, min_ver=None, ignore_exit_code=False):
or "0.9" <= info.version <= "1.0"):
raise ExecutableNotFoundError(
f"You have pdftops version {info.version} but the minimum "
f"version supported by Matplotlib is 3.0.")
f"version supported by Matplotlib is 3.0")
return info
else:
raise ValueError("Unknown executable: {!r}".format(name))
Expand Down