Bug reports, feature requests and other issues should got to the tinycss issue tracker on Github. Any suggestion or feedback is welcome. Please include in full any error message, trackback or other detail that could be helpful.
First, get the latest git version:
git clone https://github.com/SimonSapin/tinycss.git
cd tinycssYou will need Cython and pytest. Installing in a virtualenv is recommended:
virtualenv env
. env/bin/activate
pip install Cython pytestThen, install tinycss in-place with pip’s editable mode. This will also build the accelerators:
pip install -e .Once you have everything installed (see above), just run pytest from the tinycss directory:
py.testIf the accelerators are not available for some reason, use the
TINYCSS_SKIP_SPEEDUPS_TESTS environment variable:
TINYCSS_SKIP_SPEEDUPS_TESTS=1 py.testIf you get test failures on a fresh git clone, something may have gone wrong during the installation. Otherwise, you probably found a bug. Please report it.
tox automatically creates virtualenvs for various Python versions and runs the test suite there:
pip install toxChange to the project’s root directory and just run:
toxtinycss comes with a pre-configured tox.ini file to test in CPython
2.6, 2.7, 3.1 and 3.2 as well as PyPy. You can change that with the -e
parameter:
tox -e py27,py32If you use -- in the arguments passed to tox, further arguments
are passed to the underlying py.test command:
tox -- -x --pdbThis documentation is made with Sphinx:
pip install SphinxTo build the HTML version of the documentation, change to the project’s root directory and run:
python setup.py build_sphinxThe built HTML files are in docs/_build/html.
If you would like to see something included in tinycss, please fork the repository on Github and make a pull request. Make sure to include tests for your change.
tinycss does not have a mailing-list of its own for now, but the WeasyPrint mailing-list is appropriate to discuss it.