Source

virtualenvwrapper / docsource / developers.rst

For Developers

If you would like to contribute, these instructions should help you get started. Patches, bug reports, and feature requests are all welcome through the BitBucket site. Contributions in the form of patches or pull requests are easier to integrate and will receive priority attention.

Building Documentation

The documentation for virtualenvwrapper is written in reStructuredText and converted to HTML using Sphinx. The build itself is driven by Paver. You will need the following packages in order to build the docs:

  • Sphinx
  • Paver
  • sphinxcontrib.paverutils

Once all of them are installed into a virtualenv using easy_install, run paver html to generate the HTML version of the documentation:

$ paver html
---> pavement.html
---> sphinxcontrib.paverutils.html
mkdir ./docs/html (mode 511)
sphinx-build  -b html -d ./docs/doctrees -c sphinx/pkg -Aproject=virtualenvwrapper ./docsource ./docs/html
Running Sphinx v0.6.1
loading pickled environment... done
building [html]: targets for 4 source files that are out of date
updating environment: 1 added, 1 changed, 0 removed
reading sources... [ 50%] developers
reading sources... [100%] index

/Users/dhellmann/Devel/virtualenvwrapper/src/docsource/developers.rst:19: (WARNING/2) Literal block expected; none found.
looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 20%] command_ref
writing output... [ 40%] developers
writing output... [ 60%] history
writing output... [ 80%] hooks
writing output... [100%] index

writing additional files... search
copying static files... WARNING: static directory '/Users/dhellmann/Devel/virtualenvwrapper/src/sphinx/pkg/static' does not exist
done
dumping search index... done
dumping object inventory... done
build succeeded, 2 warnings.
rmtree virtualenvwrapper/docs () {}
move docs/html virtualenvwrapper/docs

The output version of the documentation ends up in ./virtualenvwrapper/docs inside your sandbox.

Running Tests

The test suite for virtualenvwrapper uses shunit2. To run the tests under both bash and zsh, use paver test. To add new tests, modify the tests/test.sh script with new test functions.

$ paver test
---> pavement.test
bash ./tests/test.sh

test_mkvirtualenv
New python executable in env1/bin/python
Installing setuptools............done.

test_cdvirtual

test_cdsitepackages

test_mkvirtualenv_activates
New python executable in env2/bin/python
Installing setuptools............done.

test_workon

test_postactivate_hook

test_deactivate

test_deactivate_hooks

test_virtualenvwrapper_show_workon_options

test_rmvirtualenv
New python executable in deleteme/bin/python
Installing setuptools............done.

test_rmvirtualenv_no_such_env

test_missing_workon_home

Ran 12 tests.

OK
SHUNIT_PARENT=./tests/test.sh zsh -o shwordsplit ./tests/test.sh

test_mkvirtualenv
New python executable in env1/bin/python
Installing setuptools............done.

test_cdvirtual

test_cdsitepackages

test_mkvirtualenv_activates
New python executable in env2/bin/python
Installing setuptools............done.

test_workon

test_postactivate_hook

test_deactivate

test_deactivate_hooks

test_virtualenvwrapper_show_workon_options

test_rmvirtualenv
New python executable in deleteme/bin/python
Installing setuptools............done.

test_rmvirtualenv_no_such_env

test_missing_workon_home

Ran 12 tests.

OK
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.