don't use the mode argument in text.set anymore
[PyX.git] / INSTALL
blob185f2b36c26e1d83a7ca29cc278e522d0558f87b
1 Installation
2 ============
5 Prerequisites
6 -------------
8 PyX requires Python 3.2 or newer and a TeX installation (including Type1 fonts).
9 Try to start 'python', 'tex' and 'kpsewhich cmr10.pfb' (the latter should issue
10 a full path of the requested Type1 font).
13 Local usage without C extension modules
14 ---------------------------------------
16 PyX can be run without any installation. To test your environment copy the file
17 hello.py from the examples directory to the main pyx directory (where the
18 subdirectory pyx containing the modules is located) and type 'python hello.py'.
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 built and appropriate fallbacks will be used instead.
31 The build_t1code option enables building of an extension module, which enables
32 faster coding/decoding of Type 1 fonts. The only requisites for building this
33 module are the Python header files and a C compiler. Note that the C compiler
34 has to suit the Python distribution you are using.
36 The second extension module pykpathsea provides Python binding for the kpathsea
37 library, which enables fast searching for files in the TeX/LaTeX directory
38 hierarchy. You will need the header files of this library, which unfortunately
39 are not included in many standard TeX distributions. Note that the fallback,
40 which uses the kpsewhich program, works equally well, although it is not as
41 efficient as using the library directly. If you want to build the C extension
42 module, you may also have to specify the location of the kpathsea header files
43 and of the library itself in the setup.cfg file.
45 After you have adapted the setup.cfg file to your needs, you can either build
46 the extension modules locally by running
48     python setup.py build_ext -i
50 or install PyX system wide by using
52     python setup.py install
54 or an appropriate variant thereof.
57 Installation by easy_install or pip
58 -----------------------------------
60 PyX can be installed via easy_install and pip straightforwardly. It can be run
61 as an zipped egg. Note that you need to allow the installation of externally
62 hosted files. Thus you probably need to add "--allow-external pyx" in future
63 versions of pip.