Defined Type: python::package

Defined in:
manifests/package.pp

Overview

Parameters:

  • package (Any)
  • python (Any)
  • ensure (Any) (defaults to: 'present')
  • version (Any) (defaults to: '>= 0')


12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'manifests/package.pp', line 12

define python::package(
    $package,
    $python,
    $ensure = 'present',
    $version = '>= 0',
) {
  require python

  $pyenv_versions = any2array($python)

  $pyenv_versions.each |$pyenv_version| {
    pyenv_package { "${name} for ${pyenv_version}":
      ensure        => $ensure,
      package       => $package,
      version       => $version,
      pyenv_version => $pyenv_version,
      pyenv_root    => $python::pyenv::prefix,
      provider      => pip,
    }
  }
}