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 7f4191b

Browse filesBrowse files
committed
Merge pull request #6711 from Kojoley/fix-ghostscript-dependency-check
ENH: Added support for `mgs` to Ghostscript dependecy checker
1 parent c7d7d19 commit 7f4191b
Copy full SHA for 7f4191b

File tree

Expand file treeCollapse file tree

1 file changed

+13
-15
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-15
lines changed

‎setupext.py

Copy file name to clipboardExpand all lines: setupext.py
+13-15Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2017,23 +2017,21 @@ class Ghostscript(SetupPackage):
20172017
optional = True
20182018

20192019
def check(self):
2020-
try:
2021-
if sys.platform == 'win32':
2022-
command = 'gswin32c --version'
2023-
try:
2024-
output = check_output(command, shell=True,
2025-
stderr=subprocess.STDOUT)
2026-
except subprocess.CalledProcessError:
2027-
command = 'gswin64c --version'
2028-
output = check_output(command, shell=True,
2029-
stderr=subprocess.STDOUT)
2030-
else:
2031-
command = 'gs --version'
2020+
if sys.platform == 'win32':
2021+
# mgs is the name in miktex
2022+
gs_execs = ['gswin32c', 'gswin64c', 'mgs', 'gs']
2023+
else:
2024+
gs_execs = ['gs']
2025+
for gs_exec in gs_execs:
2026+
try:
2027+
command = gs_exec + ' --version'
20322028
output = check_output(command, shell=True,
20332029
stderr=subprocess.STDOUT)
2034-
return "version %s" % output.decode()[:-1]
2035-
except (IndexError, ValueError, subprocess.CalledProcessError):
2036-
raise CheckFailed()
2030+
return "version %s" % output.decode()[:-1]
2031+
except (IndexError, ValueError, subprocess.CalledProcessError):
2032+
pass
2033+
2034+
raise CheckFailed()
20372035

20382036

20392037
class LaTeX(SetupPackage):

0 commit comments

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