ReleaseEngineering/PuppetAgain/Modules/python

From MozillaWiki
< ReleaseEngineering‎ | PuppetAgain‎ | Modules
Revision as of 06:18, 8 March 2012 by Djmitche (talk | contribs) (Created page with "This module handles installing Python virtualenvs containing Python packages. See ReleaseEngineering/How To/Install a Python Virtualenv with Puppet for a tutorial reference ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This module handles installing Python virtualenvs containing Python packages. See ReleaseEngineering/How To/Install a Python Virtualenv with Puppet for a tutorial reference to using the module.

Example

 python::virtualenv {
     "/path/to/virtualenv":
         python => "/path/to/python",
         packages => [ "package==version", "mock==0.6.0",
                       "buildbot==0.8.0" ];
 }

or, to remove a virtualenv,

 python::virtualenv {
     "/path/to/virtualenv":
         ensure => absent;
 }

Notes

Specify the packages using the pypi "==" notation; do NOT use any other operator, e.g., "=>" or an unqualified package name.

An appropriate package file for the system must be available in the python package directory. For pure-python packages, this can be an sdist tarball or zip; for packages that include some compiled source (e.g., Twisted), things can get a bit more complicated - see here for more details.