class PoisePython::Resources::PythonRuntime::Resource

A `python_runtime` resource to manage Python installations.

@provides python_runtime @action install @action uninstall @example

python_runtime '2.7'

Public Instance Methods

python_binary() click to toggle source

The path to the `python` binary for this Python installation. This is an output property.

@return [String] @example

execute "#{resources('python_runtime[2.7]').python_binary} myapp.py"
# File lib/poise_python/resources/python_runtime.rb, line 93
def python_binary
  provider_for_action(:python_binary).python_binary
end
python_environment() click to toggle source

The environment variables for this Python installation. This is an output property.

@return [Hash<String, String>] @example

execute '/opt/myapp.py' do
  environment resources('python_runtime[2.7]').python_environment
end
# File lib/poise_python/resources/python_runtime.rb, line 105
def python_environment
  provider_for_action(:python_environment).python_environment
end