Resource Type: venv_package

Defined in:
lib/puppet/type/venv_package.rb
Providers:
pip

Overview

Installs Python packages within a virtual environment.

Properties

  • ensure (defaults to: installed)

    The basic property that the resource should be in.

    Supported values:
    • present
    • absent
    • installed (alias for: present)
    • latest
    • /./

Parameters

  • install_options

    An array of additional options to pass when installing a Python package with pip. For example, to use an internal PyPI url:

    venv_package { 'requests@/path/to/venv':
      ensure          => installed,
      install_options => [ { '--index-url' => 'https://pypi.mycorp.com' } ],
    }
    
  • name (namevar)

    The name of the package to install

  • provider

    The specific backend to use for this ‘venv_package` resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.

  • pypi (defaults to: https://pypi.python.org/pypi)

    The URL to use for Python Packaging Index (PyPI) to query for latest packages. Defaults to pypi.python.org/pypi

  • source

    Where to find the actual pip package. This must be a local file (or on a network file system) or a URL that pip understands.

Features

  • installable

    The provider can install packages.

  • uninstallable

    The provider can uninstall packages.

  • upgradeable

    The provider can upgrade to the latest version of a package. This feature is used by specifying ‘latest` as the desired value for the package.

  • versionable

    The provider is capable of interrogating the package database for installed version(s), and can select which out of a set of available versions of a package to install if asked.

  • holdable

    The provider is capable of placing packages on hold such that they are not automatically upgraded as a result of other package dependencies unless explicit action is taken by a user or another package. Held is considered a superset of installed.

  • install_options

    The provider accepts options to be passed to the installer command.