fabtools.python_setuptools
¶
Python packages¶
This module provides tools for installing Python packages using
the easy_install
command provided by setuptools.
See also
-
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.python_setuptools.
is_setuptools_installed
(python_cmd='python')[source]¶ Check if setuptools is installed.
-
fabtools.python_setuptools.
install_setuptools
(python_cmd='python', use_sudo=True)[source]¶ Install the latest version of setuptools.
import fabtools fabtools.python_setuptools.install_setuptools()
-
fabtools.python_setuptools.
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 usespip
to install packages.