salt.modules.pyenv

Manage python installations with pyenv.

Note

Git needs to be installed and available via PATH if pyenv is to be installed automatically by the module.

New in version v2014.04.

salt.modules.pyenv.default(python=None, runas=None)

Returns or sets the currently defined default python.

python=None

The version to set as the default. Should match one of the versions listed by pyenv.versions. Leave blank to return the current default.

CLI Example:

salt '*' pyenv.default
salt '*' pyenv.default 2.0.0-p0
salt.modules.pyenv.do(cmdline=None, runas=None)

Execute a python command with pyenv's shims from the user or the system.

CLI Example:

salt '*' pyenv.do 'gem list bundler'
salt '*' pyenv.do 'gem list bundler' deploy
salt.modules.pyenv.do_with_python(python, cmdline, runas=None)

Execute a python command with pyenv's shims using a specific python version.

CLI Example:

salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler'
salt '*' pyenv.do_with_python 2.0.0-p0 'gem list bundler' deploy
salt.modules.pyenv.install(runas=None, path=None)

Install pyenv systemwide

CLI Example:

salt '*' pyenv.install
salt.modules.pyenv.install_python(python, runas=None)

Install a python implementation.

python

The version of python to install, should match one of the versions listed by pyenv.list

CLI Example:

salt '*' pyenv.install_python 2.0.0-p0
salt.modules.pyenv.is_installed(runas=None)

Check if pyenv is installed.

CLI Example:

salt '*' pyenv.is_installed
salt.modules.pyenv.list_(runas=None)

List the installable versions of python.

CLI Example:

salt '*' pyenv.list
salt.modules.pyenv.rehash(runas=None)

Run pyenv rehash to update the installed shims.

CLI Example:

salt '*' pyenv.rehash
salt.modules.pyenv.uninstall_python(python, runas=None)

Uninstall a python implementation.

python

The version of python to uninstall. Should match one of the versions listed by pyenv.versions

CLI Example:

salt '*' pyenv.uninstall_python 2.0.0-p0
salt.modules.pyenv.update(runas=None, path=None)

Updates the current versions of pyenv and python-Build

CLI Example:

salt '*' pyenv.update
salt.modules.pyenv.versions(runas=None)

List the installed versions of python.

CLI Example:

salt '*' pyenv.versions