Working on packaging requires the installation of a small number of
development dependencies. These are listed in
dev-requirements.txt and they
can be installed in a virtualenv using pip. Once you’ve installed the
dependencies, install packaging in
editable mode. For example:
$ # Create a virtualenv and activate it $ pip install --requirement dev-requirements.txt $ pip install --editable .
You are now ready to run the tests and build the documentation.
$ py.test ... 62746 passed in 220.43 seconds
This runs the tests with the default Python interpreter.
You can also verify that the tests pass on other supported Python interpreters. For this we use tox, which will automatically create a virtualenv for each supported Python version and run the tests. For example:
$ tox ... ERROR: py26: InterpreterNotFound: python2.6 py27: commands succeeded ERROR: pypy: InterpreterNotFound: pypy ERROR: py32: InterpreterNotFound: python3.2 py33: commands succeeded docs: commands succeeded pep8: commands succeeded
You may not have all the required Python versions installed, in which case you
will see one or more
Use tox to build the documentation. For example:
$ tox -e docs ... docs: commands succeeded congratulations :)
The HTML documentation index can now be found at