2 # This file should help users tracking problems with their TeX installation
3 # It spits out a lot of information about the Python installation, the PyX
4 # installation and the environment in which PyX will try to use TeX/LaTeX.
9 pyx
.text
.set(fontmaps
="psfonts.map psfonts.cmz")
11 def test_installation():
13 from pyx
.pykpathsea
import _pykpathsea
15 compiled_pykpathsea
= False
17 compiled_pykpathsea
= False
19 print "Platform is %s" % sys
.platform
20 print "Python installation prefix is %s" % sys
.prefix
21 print "Python executable is %s" % sys
.executable
22 print "PyX comes from %s" % pyx
.__file
__
23 print "PyX version %s" % pyx
.__version
__
24 if compiled_pykpathsea
:
25 print "PyX pykpathsea compiled from C module"
27 print "PyX pykpathsea python module used"
32 for command
in [r
"echo $0 \"$
*\"",
34 r"echo $BASH_SUBSHELL
",
44 r"file `which kpsewhich`
",
46 r"file `which latex`
",
48 stdin, stdout, stderr = os.popen3(command)
49 print "\"%22s
\" -->" % (command),
52 for x in [stdin, stdout, stderr]:
58 pyx.pykpathsea.kpse_gf_format,
59 pyx.pykpathsea.kpse_pk_format,
60 pyx.pykpathsea.kpse_any_glyph_format,
61 pyx.pykpathsea.kpse_tfm_format,
62 pyx.pykpathsea.kpse_afm_format,
63 pyx.pykpathsea.kpse_base_format,
64 pyx.pykpathsea.kpse_bib_format,
65 pyx.pykpathsea.kpse_bst_format,
66 pyx.pykpathsea.kpse_cnf_format,
67 pyx.pykpathsea.kpse_db_format,
68 pyx.pykpathsea.kpse_fmt_format,
69 pyx.pykpathsea.kpse_fontmap_format,
70 pyx.pykpathsea.kpse_mem_format,
71 pyx.pykpathsea.kpse_mf_format,
72 pyx.pykpathsea.kpse_mfpool_format,
73 pyx.pykpathsea.kpse_mft_format,
74 pyx.pykpathsea.kpse_mp_format,
75 pyx.pykpathsea.kpse_mppool_format,
76 pyx.pykpathsea.kpse_mpsupport_format,
77 pyx.pykpathsea.kpse_ocp_format,
78 pyx.pykpathsea.kpse_ofm_format,
79 pyx.pykpathsea.kpse_opl_format,
80 pyx.pykpathsea.kpse_otp_format,
81 pyx.pykpathsea.kpse_ovf_format,
82 pyx.pykpathsea.kpse_ovp_format,
83 pyx.pykpathsea.kpse_pict_format,
84 pyx.pykpathsea.kpse_tex_format,
85 pyx.pykpathsea.kpse_texdoc_format,
86 pyx.pykpathsea.kpse_texpool_format,
87 pyx.pykpathsea.kpse_texsource_format,
88 pyx.pykpathsea.kpse_tex_ps_header_format,
89 pyx.pykpathsea.kpse_troff_font_format,
90 pyx.pykpathsea.kpse_type1_format,
91 pyx.pykpathsea.kpse_vf_format,
92 pyx.pykpathsea.kpse_dvips_config_format,
93 pyx.pykpathsea.kpse_ist_format,
94 pyx.pykpathsea.kpse_truetype_format,
95 pyx.pykpathsea.kpse_type42_format,
96 pyx.pykpathsea.kpse_web2c_format,
97 pyx.pykpathsea.kpse_program_text_format,
98 pyx.pykpathsea.kpse_program_binary_format,
99 pyx.pykpathsea.kpse_miscfonts_format,
100 pyx.pykpathsea.kpse_web_format,
101 pyx.pykpathsea.kpse_cweb_format]
103 for fontmap in pyx.text.defaulttexrunner.fontmaps.split():
105 for format in allformats:
106 mappath = pyx.pykpathsea.find_file(fontmap, format)
109 print "\"%s\" found at
\"%s\" as format
\"%s\"" % (fontmap, mappath, format)
111 print "\"%s\" not found
" % fontmap