Python packages

This module provides tools for installing Python packages using the easyinstall command provided by setuptools.
See also
fabtools.python and fabtools.require.python
**fabtools.python_setuptools.package_version(_name
, python_cmd=’python’)[source]
Get the installed version of a package
Returns
None if it can’t be found.
fabtools.pythonsetuptools.is_setuptools_installed(_python_cmd=’python’)[source]
Check if setuptools is installed.
fabtools.pythonsetuptools.install_setuptools(_python_cmd=’python’, use_sudo=True)[source]
Install the latest version of setuptools.
import fabtools fabtools.python_setuptools.install_setuptools()
fabtools.pythonsetuptools.install(_packages, upgrade=False, use_sudo=False, python_cmd=’python’)[source]
Install Python packages with
easy_install.
Examples:
import fabtools # Install a single package fabtools.python_setuptools.install(‘package’, use_sudo=True) # Install a list of packages fabtools.python_setuptools.install([‘pkg1’, ‘pkg2’], use_sudo=True)
Note
most of the time, you’ll want to use fabtools.python.install() instead, which uses
pip** to install packages.