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

Skip to content

Commit 293d11c

Browse files
committed
Remove LaTeX checking in setup.py.
We already have runtime tests for LaTeX and associated dependencies; the check in setup.py is not used for anything.
1 parent c280700 commit 293d11c

File tree

2 files changed

+0
-74
lines changed

2 files changed

+0
-74
lines changed

setup.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,6 @@
105105
setupext.BackendAgg(),
106106
setupext.BackendCairo(),
107107
setupext.Windowing(),
108-
'Optional LaTeX dependencies',
109-
setupext.DviPng(),
110-
setupext.Ghostscript(),
111-
setupext.LaTeX(),
112-
setupext.PdfToPs(),
113108
'Optional package data',
114109
setupext.Dlls(),
115110
]

setupext.py

Lines changed: 0 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,75 +2181,6 @@ def check_requirements(self):
21812181
return "cairocffi version %s" % cairocffi.version
21822182

21832183

2184-
class DviPng(SetupPackage):
2185-
name = "dvipng"
2186-
optional = True
2187-
2188-
def check(self):
2189-
try:
2190-
output = check_output('dvipng -version', shell=True,
2191-
stderr=subprocess.STDOUT)
2192-
return "version %s" % output.splitlines()[1].decode().split()[-1]
2193-
except (IndexError, ValueError, subprocess.CalledProcessError):
2194-
raise CheckFailed()
2195-
2196-
2197-
class Ghostscript(SetupPackage):
2198-
name = "ghostscript"
2199-
optional = True
2200-
2201-
def check(self):
2202-
if sys.platform == 'win32':
2203-
# mgs is the name in miktex
2204-
gs_execs = ['gswin32c', 'gswin64c', 'mgs', 'gs']
2205-
else:
2206-
gs_execs = ['gs']
2207-
for gs_exec in gs_execs:
2208-
try:
2209-
command = gs_exec + ' --version'
2210-
output = check_output(command, shell=True,
2211-
stderr=subprocess.STDOUT)
2212-
return "version %s" % output.decode()[:-1]
2213-
except (IndexError, ValueError, subprocess.CalledProcessError):
2214-
pass
2215-
2216-
raise CheckFailed()
2217-
2218-
2219-
class LaTeX(SetupPackage):
2220-
name = "latex"
2221-
optional = True
2222-
2223-
def check(self):
2224-
try:
2225-
output = check_output('latex -version', shell=True,
2226-
stderr=subprocess.STDOUT)
2227-
line = output.splitlines()[0].decode()
2228-
pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)'
2229-
match = re.search(pattern, line)
2230-
return "version %s" % match.group(0)
2231-
except (IndexError, ValueError, AttributeError, subprocess.CalledProcessError):
2232-
raise CheckFailed()
2233-
2234-
2235-
class PdfToPs(SetupPackage):
2236-
name = "pdftops"
2237-
optional = True
2238-
2239-
def check(self):
2240-
try:
2241-
output = check_output('pdftops -v', shell=True,
2242-
stderr=subprocess.STDOUT)
2243-
for line in output.splitlines():
2244-
line = line.decode()
2245-
if 'version' in line:
2246-
return "version %s" % line.split()[2]
2247-
except (IndexError, ValueError, subprocess.CalledProcessError):
2248-
pass
2249-
2250-
raise CheckFailed()
2251-
2252-
22532184
class OptionalPackageData(OptionalPackage):
22542185
config_category = "package_data"
22552186

0 commit comments

Comments
 (0)