Class: PoisePython::Resources::PythonPackage::Resource

Inherits:
Chef::Resource::Package
  • Object
show all
Includes:
PythonCommandMixin
Defined in:
lib/poise_python/resources/python_package.rb

Overview

A python_package resource to manage Python installations using pip.

Examples:

python_package 'django' do
  python '2'
  version '1.8.3'
end

Since:

  • 1.0.0

Provides:

  • python_package

Actions:

  • install

  • upgrade

  • uninstall

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Resource

Returns a new instance of Resource.

Since:

  • 1.0.0



116
117
118
119
120
121
122
123
# File 'lib/poise_python/resources/python_package.rb', line 116

def initialize(*args)
  super
  # For older Chef.
  @resource_name = :python_package
  # We don't have these actions.
  @allowed_actions.delete(:purge)
  @allowed_actions.delete(:reconfig)
end

Instance Attribute Details

#groupString, ...

System group to install the package.

Returns:

  • (String, Integer, nil)


102
# File 'lib/poise_python/resources/python_package.rb', line 102

attribute(:group, kind_of: [String, Integer, NilClass])

#install_optionsString, ...

Options string to be used with pip install.

Returns:

  • (String, nil, false)


106
# File 'lib/poise_python/resources/python_package.rb', line 106

attribute(:install_options, kind_of: [String, NilClass, FalseClass], default: nil)

#list_optionsString, ...

Options string to be used with pip list.

Returns:

  • (String, nil, false)


110
# File 'lib/poise_python/resources/python_package.rb', line 110

attribute(:list_options, kind_of: [String, NilClass, FalseClass], default: nil)

#userString, ...

System user to install the package.

Returns:

  • (String, Integer, nil)


114
# File 'lib/poise_python/resources/python_package.rb', line 114

attribute(:user, kind_of: [String, Integer, NilClass])