no extension module by default
[PyX/mjg.git] / INSTALL
blob04bb2e2777c39b5cbcabd953af288aa5b693aafa
1 Installation
2 ============
4 Prerequisites
5 -------------
7 PyX needs Python 2.x and a TeX installation (including Type1 fonts). Try to
8 start 'python', 'tex' and 'kpsewhich cmr10.pfb' (the later should issue a full
9 path of the requested Type1 font).
11 Local usage without C extention modules
12 ---------------------------------------
14 PyX can be run without any installation. Copy the file hello.py from the
15 examples directory to the main pyx directory and type 'python hello.py'. When
16 your TeX installation isn't configured to use Type1 fonts by default, you may
17 insert the line 'text.set(fontmaps="psfonts.cmz")' after the pyx import
18 statement and try again. See the FAQ for further details about TeX and font
19 configuration issues.
21 Installation procedure
22 ----------------------
24 The installation of PyX is pretty straightforward if you have installed the
25 Python distutils package.
27 First, you have to decide which C extension modules you want to build. This can
28 be done by setting the respective flags in the setup.cfg config file. By default
29 no C extension modules are build and appropriate fallbacks are in place.
31 The build_t1strip option enables the t1strip extension module, which provides
32 partial font downloading (i.e. only the glyphs of a font that are used are
33 included in the eps file). The only requisites for building this module are the
34 Python headers and a C compiler.
36 The second extension module provides Python binding for the kpathsea library,
37 which enables fast searching for files in the TeX/LaTeX directory hierarchy. You
38 will need the header files of this library, which are not included in many
39 standard TeX distributions. Besides that, the fallback, which uses the kpsewhich
40 program, works equally well, although it is not as efficient as using the
41 library directly. If you want to build the C extension module, you may also have
42 to specify the location of the kpathsea header files and the library in the
43 setup.cfg file.
45 After you have adapted the setup.cfg file to your needs, you can either build
46 PyX locally by just running
48     python setup.py build_ext -i
50 On the other hand, a system wide installation can be performed with help of
52     python setup.py install
54 or an appropriate variant thereof.