608
|
1 Installing Genshi
|
|
2 =================
|
|
3
|
|
4
|
|
5 .. contents:: Contents
|
|
6 :depth: 2
|
|
7 .. sectnum::
|
|
8
|
|
9
|
|
10 Prerequisites
|
|
11 -------------
|
|
12
|
|
13 * Python_ 2.3 or later (2.4 or later is strongly recommended)
|
|
14 * Optional: Setuptools_ 0.6a2 or later
|
|
15
|
|
16 .. _python: http://www.python.org/
|
|
17 .. _setuptools: http://cheeseshop.python.org/pypi/setuptools
|
|
18
|
|
19 Setuptools is only required for the `template engine plugin`_, which can be
|
|
20 used to integrate Genshi with Python web application frameworks such as Pylons
|
|
21 or TurboGears. Genshi also provides a Setuptools-based plugin that integrates
|
|
22 its `internationalization support`_ with the Babel_ library, but that support
|
|
23 can also be used without Setuptools being available (although in a slightly
|
|
24 less convenient fashion).
|
|
25
|
|
26 .. _`template engine plugin`: plugin.html
|
|
27 .. _`internationalization support`: i18n.html
|
|
28 .. _babel: http://babel.edgewall.org/
|
|
29
|
|
30
|
|
31 Installing via ``easy_install``
|
|
32 -------------------------------
|
|
33
|
|
34 If you have a recent version of Setuptools_ installed, you can directly install
|
|
35 Genshi using the easy_install command-line tool::
|
|
36
|
|
37 $ easy_install Genshi
|
|
38
|
|
39 This downloads and installs the latest version of the Genshi package.
|
|
40
|
|
41 If you have an older Genshi release installed and would like to upgrade, add
|
|
42 the ``-U`` option to the above command.
|
|
43
|
|
44
|
|
45 Installing from a Binary Installer
|
|
46 ----------------------------------
|
|
47
|
|
48 Binary packages for Windows and Mac OS X are provided for Genshi. To install
|
|
49 from such a package, simply download and open it.
|
|
50
|
|
51
|
|
52 Installing from a Source Tarball
|
|
53 --------------------------------
|
|
54
|
|
55 Once you've downloaded and unpacked a Genshi source release, enter the
|
|
56 directory where the archive was unpacked, and run::
|
|
57
|
|
58 $ python setup.py install
|
|
59
|
|
60 Note that you may need administrator/root privileges for this step, as this
|
|
61 command will by default attempt to install Genshi to the Python
|
|
62 ``site-packages`` directory on your system.
|
|
63
|
|
64 Genshi comes with an optional extension module written in C that is used to
|
|
65 improve performance in some areas. This extension is automatically compiled
|
|
66 when you run the ``setup.py`` script as shown above. In the case that the
|
|
67 extension can not be compiled, possibly due to a missing or incompatible C
|
|
68 compiler, the compilation is skipped. If you'd prefer Genshi to not use this
|
|
69 native extension module, you can explicitly bypass the compilation using the
|
|
70 ``--without-speedups`` option::
|
|
71
|
|
72 $ python setup.py --without-speedups install
|
|
73
|
|
74 For other build and installation options, please consult the easy_install_
|
|
75 and/or the Python distutils_ documentation.
|
|
76
|
|
77 .. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall
|
|
78 .. _distutils: http://docs.python.org/inst/inst.html
|
|
79
|
|
80
|
|
81 Support
|
|
82 -------
|
|
83
|
|
84 If you encounter any problems with Genshi, please don't hesitate to ask
|
|
85 questions on the Genshi `mailing list`_ or `IRC channel`_.
|
|
86
|
|
87 .. _`mailing list`: http://genshi.edgewall.org/wiki/MailingList
|
|
88 .. _`irc channel`: http://genshi.edgewall.org/wiki/IrcChannel
|