Tags:

    Agile Project Setup for Python

    This is a quick summarization of the screen casts found at ShowMeDo. It's a good quick reference for getting a project up and going with nosetests, easy_install, virtualenv, pastescript, and sphinx for documentation.

    This is not intended to be a zero to go walk through or a cut/paste example. Depending on particular setup, you may need to install various modules before hand etc. For information on doing so, refer to beginner python tutorials and the respective package sites.

    $ virtualenv mydemo
    $ cd mydemo && source bin/activate
    (mydemo) $ easy_install pastescript
    (mydemo) $ mkdir src && cd src && paster create mypackage

    We want our modules available to interactive shells and such so
    (mydemo) $ cd mypackage && python setup.py develop

    Setting up testing
    (mydemo) $ easy_install nose
    (mydemo) $ easy_install coverage

    Finally, we install sphinx for professional looking, easy to maintain documentation.
    (mydemo) $ easy_install sphinx

    Install whatever else you need and you're ready to go.

    Many thanks to Christopher Perkins for putting together the screen casts that I based this quick reference on.