-
-
Notifications
You must be signed in to change notification settings - Fork 566
/
INSTALL.txt
92 lines (57 loc) · 2.17 KB
/
INSTALL.txt
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
Installing lxml
===============
Requirements
------------
You need libxml2 and libxslt, in particular:
* libxml 2.2.16 (newer versions should work). It can be found here:
http://xmlsoft.org/downloads.html
* libxslt 1.1.12 (newer versions should work). It can be found here:
http://xmlsoft.org/XSLT/downloads.html
You also need Pyrex (0.9.3) to compile the software. It can be found
here:
* http://www.cosc.canterbury.ac.nz/~greg/python/Pyrex/
You also need Python 2.3 (Python 2.4 also ought to work).
Installation
------------
Type::
python setup.py install
to compile and install the library.
It's also possible to do this::
python2.3 setup.py build_ext -i
or just::
make
This will not install lxml, but if you place lxml's "src" on your
PYTHONPATH somehow, you can import it and play with it.
Troubleshooting
---------------
lxml's setup.py tries to be smart and uses libxml2's xml2-config to
find the installation path of libxml2. If this cannot be found or
doesn't work for some reason or another, try editing the setup.py,
by changing this::
# if you want to configure include dir manually, you can do so here,
# for instance:
# include_dirs = ['/usr/include/libxml2']
include_dirs = guess_include_dirs()
Into something like this::
include_dirs = ['/usr/include/libxml2']
If that still doesn't work, try registering the extension in a
different way entirely; there's a commented block of code at the
bottom of setup.py with an example.
If you still have trouble, contact us on the `mailing list`_.
.. _`mailing list`: http://codespeak.net/mailman/listinfo/lxml-dev
Running the tests
-----------------
You can run the main tests by using::
python test.py
Alternatively, you can use::
make test
To run the ElementTree and cElementTree compatibility tests, make sure
you have lxml on your PYTHONPATH first, then run::
python2.3 selftest.py
and::
python2.3 selftest2.py
If the tests give failures, errors, or worse, segmentation faults,
we'd really like to know. Please contact us on the `mailing list`_,
and please specify the version of libxml2, libxslt and Python you were
using.
.. _`mailing list`: http://codespeak.net/mailman/listinfo/lxml-dev