audreyr/cookiecutter-pypackage — pull request #5 by krallin (2013-08-25 10:01:52+00:00)
Title: make docs: Use project root as first element in PYTHONPATH

When we use `sys.path.append(parent)`, `parent` is the last element in the path.

Consequently, if the module we're building docs for is already installed, then that one will be installed, and `version = module.__version__` will use the version of the installed module instead of that of the source package.

Inserting the project root as first element in the PYTHONPATH lets us ensure that the source package is imported, and that its version is used.