@@ -1789,75 +1789,6 @@ def check_requirements(self):
1789
1789
return "cairocffi version %s" % cairocffi .version
1790
1790
1791
1791
1792
- class DviPng (SetupPackage ):
1793
- name = "dvipng"
1794
- optional = True
1795
-
1796
- def check (self ):
1797
- try :
1798
- output = check_output ('dvipng -version' , shell = True ,
1799
- stderr = subprocess .STDOUT )
1800
- return "version %s" % output .splitlines ()[1 ].decode ().split ()[- 1 ]
1801
- except (IndexError , ValueError , subprocess .CalledProcessError ):
1802
- raise CheckFailed ()
1803
-
1804
-
1805
- class Ghostscript (SetupPackage ):
1806
- name = "ghostscript"
1807
- optional = True
1808
-
1809
- def check (self ):
1810
- if sys .platform == 'win32' :
1811
- # mgs is the name in miktex
1812
- gs_execs = ['gswin32c' , 'gswin64c' , 'mgs' , 'gs' ]
1813
- else :
1814
- gs_execs = ['gs' ]
1815
- for gs_exec in gs_execs :
1816
- try :
1817
- command = gs_exec + ' --version'
1818
- output = check_output (command , shell = True ,
1819
- stderr = subprocess .STDOUT )
1820
- return "version %s" % output .decode ()[:- 1 ]
1821
- except (IndexError , ValueError , subprocess .CalledProcessError ):
1822
- pass
1823
-
1824
- raise CheckFailed ()
1825
-
1826
-
1827
- class LaTeX (SetupPackage ):
1828
- name = "latex"
1829
- optional = True
1830
-
1831
- def check (self ):
1832
- try :
1833
- output = check_output ('latex -version' , shell = True ,
1834
- stderr = subprocess .STDOUT )
1835
- line = output .splitlines ()[0 ].decode ()
1836
- pattern = '(3\.1\d+)|(MiKTeX \d+.\d+)'
1837
- match = re .search (pattern , line )
1838
- return "version %s" % match .group (0 )
1839
- except (IndexError , ValueError , AttributeError , subprocess .CalledProcessError ):
1840
- raise CheckFailed ()
1841
-
1842
-
1843
- class PdfToPs (SetupPackage ):
1844
- name = "pdftops"
1845
- optional = True
1846
-
1847
- def check (self ):
1848
- try :
1849
- output = check_output ('pdftops -v' , shell = True ,
1850
- stderr = subprocess .STDOUT )
1851
- for line in output .splitlines ():
1852
- line = line .decode ()
1853
- if 'version' in line :
1854
- return "version %s" % line .split ()[2 ]
1855
- except (IndexError , ValueError , subprocess .CalledProcessError ):
1856
- pass
1857
-
1858
- raise CheckFailed ()
1859
-
1860
-
1861
1792
class OptionalPackageData (OptionalPackage ):
1862
1793
config_category = "package_data"
1863
1794
0 commit comments