Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 405ce9f

Browse filesBrowse files
committed
ENH: use checkdep_ghostscript to determine ghostscript executable
1 parent cb2e0b8 commit 405ce9f
Copy full SHA for 405ce9f

File tree

Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-5
lines changed

‎lib/matplotlib/backends/backend_ps.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_ps.py
+5-5Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def _fn_name(): return sys._getframe(1).f_code.co_name
1717
from md5 import md5 #Deprecated in 2.5
1818

1919
from tempfile import mkstemp
20-
from matplotlib import verbose, __version__, rcParams
20+
from matplotlib import verbose, __version__, rcParams, checkdep_ghostscript
2121
from matplotlib._pylab_helpers import Gcf
2222
from matplotlib.afm import AFM
2323
from matplotlib.backend_bases import RendererBase, GraphicsContextBase,\
@@ -70,8 +70,9 @@ def gs_exe(self):
7070
except KeyError:
7171
pass
7272

73-
if sys.platform == 'win32': gs_exe = 'gswin32c'
74-
else: gs_exe = 'gs'
73+
gs_exe, gs_version = checkdep_ghostscript()
74+
if gs_exe is None:
75+
gs_exe = 'gs'
7576

7677
self._cached["gs_exe"] = gs_exe
7778
return gs_exe
@@ -1617,8 +1618,7 @@ def get_bbox(tmpfile, bbox):
16171618
"""
16181619

16191620
outfile = tmpfile + '.output'
1620-
if sys.platform == 'win32': gs_exe = 'gswin32c'
1621-
else: gs_exe = 'gs'
1621+
gs_exe = ps_backend_helper.gs_exe
16221622
command = '%s -dBATCH -dNOPAUSE -sDEVICE=bbox "%s"' %\
16231623
(gs_exe, tmpfile)
16241624
verbose.report(command, 'debug')

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.