Repository Puppet Puppet Download
puppet module install Siebjee-python --version 0.2.3
This python module allows you to easely manage multiple python versions for a single user
The python module provides a single module to manage pyenv, pip and virtualenv for a single user. And completely ignores the system installed python.
To install pyenv and configure pip automatically to your local pip mirror.
class {'python':
python_versions => '1.2.3',
pip_url => 'https://url/to/pip',
}
To enable virtualenv for all versions installed you only have to specify virtualenv => true.
class {'python':
versions => ['2.7.5','2.7.6']
pip_url => 'https://url/for/pip',
}
-> python::virtualenv {'/tmp/foobar':
python_version => '2.7.5'
}
-> python::pip {'pgadmin':
python_version => '2.7.5',
virtualenv => '/tmp/foobar',
install_dir => '/tmp/foobar',
pkgname => 'pgadmin4'
}
This can also be set through hiera:
python::versions:
- '2.7.5'
- '2.7.6'
- '2.7.7'
python::virtualenv: true
python::pip_url: 'https://path/to/pip'
or specify an hash of versions
python::versions:
'2.7.5':
ensure: absent
'2.7.6':
ensure: present
virtualenv: false
'2.7.7':
ensure: present
virtualenv: true
With the above hiera values you can just specify
class {'python': }
pyenv_ensure If the specified version should be present.
present absent.present
virtualenv_ensure If virtual env should be installed default.
true false.true
pyenv_version Which pyenv version should be installed.
String.1.2.5
pyenv_url Where to get pyenv from.
String.https://github.com/pyenv/pyenv.git
user The user pyenv should be installed for.
String.ec2-user
group The group pyenv should be installed for.
String.ec2-user
pyenv_install_dir Where to install pyenv.
String./home/$user/.pyenv
pip_url The pip url.
String.https://pypi.org/simple
python_versions The python versions that should be installed.
Hash or Array.empty
bashrc The bash rc of the user
String
/home/${hiera(python::user)}/.bashrc
ensure If the pyenv settings should be present.
present absent.present
user The user of the bashrc
String.$python::user
install_dir Where pyenv is installed.
String.$python::pyenv_install_dir
ensure If the virtualenv should be present.
present absent.present
python_version Which python version to use.
String
user The user pyenv is installed for.
String.$python::user
group The group pyenv is installed for.
String.$python::group
runas The user that runs the commnad.
String.$user
virtualenv The virtualenv name.
String.$title
pyenv_root Where pyenv is installed.
String.$python::pyenv_install_dir
install_dir Where to install the package.
String
python_version Which python version to use.
String
pkgname The package name.
String.$title
user The owner of the package.
String.$python::user
group The owner group of the package.
String.$python::group
runas The user pip should un as.
String.$user
pyenv_root Where pyenv is installed.
String.$python::pyenv_install_dir
requirements To install the requirements.
String.undef
virtualenv Which virtualenv to use.
String.undef
Only *NIX os like systems can use this module.