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

Skip to content

Commit f2118ad

Browse files
committed
Simplify checking for tex packages.
It's already implemented in dviread.
1 parent d235b02 commit f2118ad

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/matplotlib/tests/test_backend_pgf.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,7 @@ def check_for(texsystem):
5252

5353

5454
def _has_tex_package(package):
55-
return (shutil.which("kpsewhich")
56-
and subprocess.run(["kpsewhich", f"{package}.sty"],
57-
stdout=subprocess.PIPE).returncode == 0)
55+
return bool(mpl.dviread.find_tex_file(f"{package}.sty"))
5856

5957

6058
def compare_figure(fname, savefig_kwargs={}, tol=0):

0 commit comments

Comments
 (0)