Forge Home

pyenv

Pyenv - Python Version Manager module

27,874 downloads

26,902 latest version

3.5 quality score

We run a couple of automated
scans to help you access a
module's quality. Each module is
given a score based on how well
the author has formatted their
code and documentation and
modules are also checked for
malware using VirusTotal.

Please note, the information below
is for guidance only and neither of
these methods should be considered
an endorsement by Puppet.

Version information

  • 0.1.1 (latest)
  • 0.1.0
released Dec 9th 2014

Start using this module

  • r10k or Code Manager
  • Bolt
  • Manual installation
  • Direct download

Add this module to your Puppetfile:

mod 'Sliim-pyenv', '0.1.1'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add Sliim-pyenv
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install Sliim-pyenv --version 0.1.1

Direct download is not typically how you would use a Puppet module to manage your infrastructure, but you may want to download the module in order to inspect the code.

Download
Tags: python, pyenv

Documentation

Sliim/pyenv — version 0.1.1 Dec 9th 2014

####Table of Contents

Build Status

  1. Overview
  2. Module Description - What the module does and why it is useful
  3. Usage - Configuration options and additional functionality
  4. Reference - An under-the-hood peek at what the module is doing and how
  5. OS compatibility
  6. Development - Guide for contributing to the module

Overview

This module provides a way to install pyenv, a python version manager, from https://github.com/yyuu/pyenv repository and manage it. Only pyenv installation and version compilation are available at this time.

Module Description

This module uses git to clone repository and setup user's profile to initialize pyenv. Compilation are done with pyenv install command.

Usage

Pyenv installation

Package dependencies installation:

include pyenv

You can install pyenv for a specific user with the following code:

pyenv::install { 'foobar': }

This install pyenv for foobar user and setup his profile to load it at login.

Python compilation

You can download and compile a python version with the following code:

pyenv::compile { 'compile 2.7.5 foobar':
  user   => 'foobar',
  python => '2.7.5',
  global => true,
}

This download and compile Python 2.7.5 for foobar user. This version will be set as the global python version for this user.

Pip command

With this puppet module you will be able to use the pip command to install, uninstall or update package.

pip {'yoda tool':
    ensure          => 'installed',            # Can be present, installed, absent, purged, latest
    user            => 'my_user',              # Required
    package         => 'yoda',                 # Optional, can be an Array, take name if not specified
    package_version => '==0.1.2',              # Optional, only works when ensure is present or installed
    pyenv_root      => '/home/my_user/.pyenv', # Optional
    python_version  => '3.3.2',                # Optional
}

You can install multiple package in one command:

pip {'tests tools':
    ensure          => 'installed',  
    user            => 'my_user',  
    package         => [ 'nosetests', 'mock' ],  
    package_version => [ '==1.3.0', '==1.0.1' ],
    python_version  => '3.3.2',
}

##Reference

This module use pyenv repository available on github here: https://github.com/yyuu/pyenv.

OS compatibility

  • Debian / ubuntu
  • Redhat / centos

##Development

See CONTRIBUTING.md file.