cmlenz@608: Installing Genshi cmlenz@608: ================= cmlenz@608: cmlenz@608: cmlenz@608: .. contents:: Contents cmlenz@608: :depth: 2 cmlenz@608: .. sectnum:: cmlenz@608: cmlenz@608: cmlenz@608: Prerequisites cmlenz@608: ------------- cmlenz@608: cmlenz@756: * Python_ 2.4 or later cmlenz@756: * Optional: Setuptools_ 0.6c3 or later cmlenz@608: cmlenz@608: .. _python: http://www.python.org/ cmlenz@608: .. _setuptools: http://cheeseshop.python.org/pypi/setuptools cmlenz@608: cmlenz@608: Setuptools is only required for the `template engine plugin`_, which can be cmlenz@608: used to integrate Genshi with Python web application frameworks such as Pylons cmlenz@608: or TurboGears. Genshi also provides a Setuptools-based plugin that integrates cmlenz@608: its `internationalization support`_ with the Babel_ library, but that support cmlenz@608: can also be used without Setuptools being available (although in a slightly cmlenz@608: less convenient fashion). cmlenz@608: cmlenz@608: .. _`template engine plugin`: plugin.html cmlenz@608: .. _`internationalization support`: i18n.html cmlenz@608: .. _babel: http://babel.edgewall.org/ cmlenz@608: cmlenz@608: cmlenz@608: Installing via ``easy_install`` cmlenz@608: ------------------------------- cmlenz@608: cmlenz@608: If you have a recent version of Setuptools_ installed, you can directly install cmlenz@608: Genshi using the easy_install command-line tool:: cmlenz@608: cmlenz@608: $ easy_install Genshi cmlenz@608: cmlenz@608: This downloads and installs the latest version of the Genshi package. cmlenz@608: cmlenz@608: If you have an older Genshi release installed and would like to upgrade, add cmlenz@608: the ``-U`` option to the above command. cmlenz@608: cmlenz@608: cmlenz@608: Installing from a Binary Installer cmlenz@608: ---------------------------------- cmlenz@608: cmlenz@608: Binary packages for Windows and Mac OS X are provided for Genshi. To install cmlenz@608: from such a package, simply download and open it. cmlenz@608: cmlenz@608: cmlenz@608: Installing from a Source Tarball cmlenz@608: -------------------------------- cmlenz@608: cmlenz@608: Once you've downloaded and unpacked a Genshi source release, enter the cmlenz@608: directory where the archive was unpacked, and run:: cmlenz@608: cmlenz@608: $ python setup.py install cmlenz@608: cmlenz@608: Note that you may need administrator/root privileges for this step, as this cmlenz@608: command will by default attempt to install Genshi to the Python cmlenz@608: ``site-packages`` directory on your system. cmlenz@608: cmlenz@608: Genshi comes with an optional extension module written in C that is used to cmlenz@608: improve performance in some areas. This extension is automatically compiled cmlenz@608: when you run the ``setup.py`` script as shown above. In the case that the cmlenz@608: extension can not be compiled, possibly due to a missing or incompatible C cmlenz@608: compiler, the compilation is skipped. If you'd prefer Genshi to not use this cmlenz@608: native extension module, you can explicitly bypass the compilation using the cmlenz@608: ``--without-speedups`` option:: cmlenz@608: cmlenz@608: $ python setup.py --without-speedups install cmlenz@608: cmlenz@608: For other build and installation options, please consult the easy_install_ cmlenz@608: and/or the Python distutils_ documentation. cmlenz@608: cmlenz@608: .. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall cmlenz@608: .. _distutils: http://docs.python.org/inst/inst.html cmlenz@608: cmlenz@608: cmlenz@608: Support cmlenz@608: ------- cmlenz@608: cmlenz@608: If you encounter any problems with Genshi, please don't hesitate to ask cmlenz@608: questions on the Genshi `mailing list`_ or `IRC channel`_. cmlenz@608: cmlenz@608: .. _`mailing list`: http://genshi.edgewall.org/wiki/MailingList cmlenz@608: .. _`irc channel`: http://genshi.edgewall.org/wiki/IrcChannel