File: INSTALL

package info (click to toggle)
pyx 0.12.1-11
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 3,736 kB
  • sloc: python: 20,226; ansic: 99; makefile: 80; sh: 8
file content (108 lines) | stat: -rw-r--r-- 4,282 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
Installation
============


Prerequisites
-------------

PyX requires Python 2.3 or newer and a TeX installation (including Type1 fonts).
Try to start 'python', 'tex' and 'kpsewhich cmr10.pfb' (the latter should issue
a full path of the requested Type1 font).


Local usage without C extension modules
---------------------------------------

PyX can be run without any installation. To test your environment copy the file
hello.py from the examples directory to the main pyx directory (where the
subdirectory pyx containing the modules is located) and type 'python hello.py'.
When your TeX installation isn't configured to use Type1 fonts by default, you
may have to insert the line 'text.set(fontmaps="psfonts.cmz")' after the import
statement and try again. See the FAQ for further details about TeX and font
configuration issues.


Installation procedure
----------------------

The installation of PyX is pretty straightforward if you have installed the
Python distutils package.

First, you have to decide which C extension modules you want to build. This can
be done by setting the respective flags in the setup.cfg config file. By default
no C extension modules are built and appropriate fallbacks will be used instead.

The build_t1code option enables building of an extension module, which enables
faster coding/decoding of Type 1 fonts. The only requisites for building this
module are the Python header files and a C compiler. Note that the C compiler
has to suit the Python distribution you are using.

The second extension module pykpathsea provides Python binding for the kpathsea
library, which enables fast searching for files in the TeX/LaTeX directory
hierarchy. You will need the header files of this library, which unfortunately
are not included in many standard TeX distributions. Note that the fallback,
which uses the kpsewhich program, works equally well, although it is not as
efficient as using the library directly. If you want to build the C extension
module, you may also have to specify the location of the kpathsea header files
and of the library itself in the setup.cfg file.

After you have adapted the setup.cfg file to your needs, you can either build
the extension modules locally by running

    python setup.py build_ext -i

or install PyX system wide by using

    python setup.py install

or an appropriate variant thereof.


For Mac OS X users
------------------

A complete install of the TeX i-Package (http://ii2.sourceforge.net/) contains
the kpathsea library. The include files and the library itself can be found in
/usr/local/teTeX/include and /usr/local/teTeX/lib, respectively. These
directories should be indicated in the setup.cfg file.


Path setup when installing to a non-standard directory layout
-------------------------------------------------------------

PyX places shared data in the directory <install-dir>/share/pyx and the system
wide configuration in the file <root>/etc/pyxrc. <install-dir> and <root> are
options to the distutils install-data command. See the distutils documentation
for details. The final path information is stored in siteconfig.py. While the
original siteconfig.py calculates the positions relative to its current
position thus enabling local usage, during install a proper siteconfig.py will
be created.

To install the complete package at some other place, say /tmp, use the command

    python setup.py install --root=/tmp --install-data=/ --install-lib=/

You can then tell python to use this installation by

    import sys
    sys.path.insert(0, "/tmp")

or by adjusting your PYTHONPATH environment variable.


Compiling the manual
--------------------

For the layout of the manual we have made use of the standard Python
documentation framework. For building the manual, you will need the script
"mkhowto" of your Python distribution. Please make a soft-link of this script
into the manual directory

    cd manual/
    ln -s </usr/lib/>python/doc/tools/mkhowto mkhowto
    make

Note that this requires Python version 2.3 and above. When using older Python
versions you need to get the Python documentation sources separately from
http://www.python.org/ and try to find the script there. Alternatively you may
download the manual from the PyX homepage at http://pyx.sourceforge.net/.