| [287] | 1 | Installing Genshi |
|---|
| [233] | 2 | ================= |
|---|
| 3 | |
|---|
| [724] | 4 | |
|---|
| 5 | .. contents:: Contents |
|---|
| 6 | :depth: 2 |
|---|
| 7 | .. sectnum:: |
|---|
| 8 | |
|---|
| 9 | |
|---|
| [233] | 10 | Prerequisites |
|---|
| 11 | ------------- |
|---|
| 12 | |
|---|
| [882] | 13 | * Python_ 2.4 or later |
|---|
| 14 | * Optional: Setuptools_ 0.6c3 or later |
|---|
| [233] | 15 | |
|---|
| [724] | 16 | .. _python: http://www.python.org/ |
|---|
| 17 | .. _setuptools: http://cheeseshop.python.org/pypi/setuptools |
|---|
| [233] | 18 | |
|---|
| [724] | 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). |
|---|
| [233] | 25 | |
|---|
| [724] | 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 | |
|---|
| [287] | 55 | Once you've downloaded and unpacked a Genshi source release, enter the |
|---|
| [724] | 56 | directory where the archive was unpacked, and run:: |
|---|
| [233] | 57 | |
|---|
| 58 | $ python setup.py install |
|---|
| 59 | |
|---|
| [724] | 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. |
|---|
| [233] | 63 | |
|---|
| [724] | 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:: |
|---|
| [233] | 71 | |
|---|
| [724] | 72 | $ python setup.py --without-speedups install |
|---|
| [233] | 73 | |
|---|
| [724] | 74 | For other build and installation options, please consult the easy_install_ |
|---|
| 75 | and/or the Python distutils_ documentation. |
|---|
| [233] | 76 | |
|---|
| [724] | 77 | .. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall |
|---|
| 78 | .. _distutils: http://docs.python.org/inst/inst.html |
|---|
| 79 | |
|---|
| 80 | |
|---|
| [233] | 81 | Support |
|---|
| 82 | ------- |
|---|
| 83 | |
|---|
| [287] | 84 | If you encounter any problems with Genshi, please don't hesitate to ask |
|---|
| [724] | 85 | questions on the Genshi `mailing list`_ or `IRC channel`_. |
|---|
| [233] | 86 | |
|---|
| [724] | 87 | .. _`mailing list`: http://genshi.edgewall.org/wiki/MailingList |
|---|
| 88 | .. _`irc channel`: http://genshi.edgewall.org/wiki/IrcChannel |
|---|