<commit_before>Documentation
=============

* **Installing**
* `Using </using/>`_
* `Hacking </hacking/>`_
* `Features </features/>`_

Installing WeasyPrint
---------------------

WeasyPrint 0.6 depends on:

.. Note: keep this in sync with setup.py

* CPython 2.6, 2.7 or 3.2
* Pango **>= 1.29.3** with GObject introspection
* PyGObject
* PyCairo
* lxml
* pystacia
* cssutils >= 0.9.9
* CairoSVG >= 0.3

Unless you distribution already has a package for WeasyPrint, (the `Kozea
overlay`_ has one for Gentoo), we recommend that you install pystacia,
cssutils, CairoSVG and WeasyPrint itself in a `virtualenv`_ with `pip`_,
and everything else with your distribution’s packages.

.. _Kozea overlay: https://github.com/Kozea/Overlay/blob/master/README
.. _pip: http://www.pip-installer.org/
.. _virtualenv: http://www.virtualenv.org/

On a Debian-based system: (Pango is recent enough in Debian Wheezy and
Ubuntu 11.10.)

.. code-block:: sh

    sudo apt-get install gir1.2-pango-1.0 python-gobject python-cairo python-lxml imagemagick

Then, in a virtualenv: (this will also pull pystacia, cssutils and CairoSVG)

.. code-block:: sh

    source $MY_VIRTUALENV/bin/activate
    pip install WeasyPrint

If everything goes well, you’re ready to `start using </using/>`_ WeasyPrint!
Otherwise, please copy the exact error message before `asking for help
</community/>`_.
<commit_msg>Document the AUR packages.<commit_after>Documentation
=============

* **Installing**
* `Using </using/>`_
* `Hacking </hacking/>`_
* `Features </features/>`_

Installing WeasyPrint
---------------------

WeasyPrint 0.6 depends on:

.. Note: keep this in sync with setup.py

* CPython 2.6, 2.7 or 3.2
* Pango **>= 1.29.3** with GObject introspection
* PyGObject
* PyCairo
* lxml
* pystacia
* cssutils >= 0.9.9
* CairoSVG >= 0.3

WeasyPrint has been packaged for some Linux distributions:

* Archlinux: in the AUR as `python2-weasyprint`_ (for Python 2) or
  `python-weasyprint`_ (for Python 3). Only the later installs a
  ``/usr/bin/weasyprint`` executable.
* Gentoo: in the `Kozea overlay`_

(Please do `tell us`_ if you make such a package!)

.. _python-weasyprint: https://aur.archlinux.org/packages.php?ID=57205
.. _python2-weasyprint: https://aur.archlinux.org/packages.php?ID=57201
.. _Kozea overlay: https://github.com/Kozea/Overlay/blob/master/README
.. _tell us: /community/

For other distributions, we recommend that you install pystacia,
cssutils, CairoSVG and WeasyPrint itself in a `virtualenv`_ with `pip`_,
and everything else with your distribution’s packages.

.. _pip: http://www.pip-installer.org/
.. _virtualenv: http://www.virtualenv.org/

For example, on a Debian Wheezy or later, or Ubuntu 11.10 or later:

.. code-block:: sh

    sudo apt-get install gir1.2-pango-1.0 python-gobject python-cairo python-lxml imagemagick

Then, in a virtualenv: (this will also pull pystacia, cssutils and CairoSVG)

.. code-block:: sh

    source $MY_VIRTUALENV/bin/activate
    pip install WeasyPrint

If everything goes well, you’re ready to `start using </using/>`_ WeasyPrint!
Otherwise, please copy the exact error message before `asking for help
</community/>`_.

{'fraction_non_alphanumeric': 0.1388272583201268, 'fraction_numerical': 0.02028526148969889, 'mean_word_length': 3.7818181818181817, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 19, 'https://': 4, 'lorem ipsum': 0, 'www.': 4, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2924060', 'n_tokens_mistral': 1134, 'n_tokens_neox': 1055, 'n_words': 342}