Forge Home

python

Configure python via Boxen

13,408 downloads

8,002 latest version

4.6 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.

Support the Puppet Community by contributing to this module

You are welcome to contribute to this module by suggesting new features, currency updates, or fixes. Every contribution is valuable to help ensure that the module remains compatible with the latest Puppet versions and continues to meet community needs. Complete the following steps:

  1. Review the module’s contribution guidelines and any licenses. Ensure that your planned contribution aligns with the author’s standards and any legal requirements.
  2. Fork the repository on GitHub, make changes on a branch of your fork, and submit a pull request. The pull request must clearly document your proposed change.

For questions about updating the module, contact the module’s author.

Version information

  • 3.0.12 (latest)
  • 3.0.11
  • 3.0.10
  • 3.0.9
  • 3.0.8
  • 3.0.7
  • 3.0.6
  • 3.0.5
  • 3.0.4
  • 3.0.3
  • 3.0.2
  • 3.0.1
  • 2.8.6 (deleted)
  • 0.1.0
released Dec 13th 2015
This version is compatible with:
  • Darwin

Start using this module

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

Add this module to your Puppetfile:

mod 'halyard-python', '3.0.12'
Learn more about managing modules with a Puppetfile

Add this module to your Bolt project:

bolt module add halyard-python
Learn more about using this module with an existing project

Manually install this module globally with Puppet module tool:

puppet module install halyard-python --version 3.0.12

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

Documentation

halyard/python — version 3.0.12 Dec 13th 2015

python

Puppet Forge Dependency Status MIT Licensed Build Status

Install Python versions using pyenv. Module based off of puppet-ruby and puppet-nodejs.

This is a fork from Matthew Loberg's puppet-python, tweaked for my environment and Puppet 4 compat.

Changes from upstream

  • Adjusted to use CircleCI
  • Adjusted to support Puppet 4 module data bindings
  • Added support for multiple global python versions
  • Added support to python::package for an array of versions
  • Allow skipping pyenv init on shell creation using SKIP_PYENV_INIT environment variable

Usage

# Install Python versions
python::version { '2.7.10': }
python::version { '3.5.0': }

# Set the global version of Python
class { 'python::global':
  version => '2.7.7'
}

# ensure a certain python version is used in a dir
python::local { '/path/to/some/project':
  version => '3.4.1'
}

# Install the latest version of virtualenv
$version = '3.4.1'
python::package { "virtualenv for ${version}":
  package => 'virtualenv',
  python  => $version,
}
# Install Django 1.6.x
python::package { "django for 2.7.7":
  package => 'django',
  python  => '2.7.7',
  version => '>=1.6,<1.7',
}

# Installing a pyenv plugin
python::plugin { 'pyenv-virtualenvwrapper':
  ensure => 'v20140122',
  source => 'yyuu/pyenv-virtualenvwrapper',
}

# Running a package script
# pyenv-installed gems cannot be run in the boxen installation environment which uses the system
# python. The environment must be cleared (env -i) so an installed python (and packages) can be used in a new shell.
exec { "env -i bash -c 'source /opt/boxen/env.sh && PYENV_VERSION=${version} virtualenv venv'":
  provider => 'shell',
  cwd => "~/src/project",
  require => Python::Package["virtualenv for ${version}"],
}

Required Puppet Modules

  • boxen >= 3.2.0
  • repository >= 2.1
  • gcc
  • stdlib
  • java (jython)

License

puppet-python is released under the MIT License. See the bundled LICENSE file for details.