Class: PoisePython::Resources::PythonRuntime::Resource
- Inherits:
-
Chef::Resource
- Object
- Chef::Resource
- PoisePython::Resources::PythonRuntime::Resource
- Defined in:
- lib/poise_python/resources/python_runtime.rb
Overview
A python_runtime resource to manage Python installations.
Direct Known Subclasses
Instance Attribute Summary collapse
-
#pip_version ⇒ String, Boolean
Version of pip to install.
-
#setuptools_version ⇒ String, Boolean
Version of Setuptools to install.
-
#version ⇒ String
Version of Python to install.
-
#virtualenv_version ⇒ String, Boolean
Version of Virtualenv to install.
-
#wheel_version ⇒ String, Boolean
Version of Wheel to install.
Instance Method Summary collapse
-
#python_binary ⇒ String
The path to the
pythonbinary for this Python installation. -
#python_environment ⇒ Hash<String, String>
The environment variables for this Python installation.
Instance Attribute Details
#pip_version ⇒ String, Boolean
Due to https://github.com/pypa/pip/issues/1087, the latest version of pip will always be installed initially. It will then downgrade to the requested version if needed.
Disabling the pip install may result in other resources being non-functional.
Version of pip to install. If set to true, the latest available
pip will be used. If set to false, pip will not be installed. If
set to a URL, that will be used as the URL to get-pip.py. If a
non-URL version is given, the get-pip.py installer will be
downloaded from the internet.
65 |
# File 'lib/poise_python/resources/python_runtime.rb', line 65 attribute(:pip_version, kind_of: [String, TrueClass, FalseClass], default: true) |
#setuptools_version ⇒ String, Boolean
Version of Setuptools to install. It set to true, the latest
available version will be used. If set to false, setuptools will
not be installed.
71 |
# File 'lib/poise_python/resources/python_runtime.rb', line 71 attribute(:setuptools_version, kind_of: [String, TrueClass, FalseClass], default: true) |
#version ⇒ String
Version of Python to install. The version is prefix-matched so '2'
will install the most recent Python 2.x, and so on.
48 |
# File 'lib/poise_python/resources/python_runtime.rb', line 48 attribute(:version, kind_of: String, name_attribute: true) |
#virtualenv_version ⇒ String, Boolean
Disabling the virtualenv install may result in other resources being non-functional.
Version of Virtualenv to install. It set to true, the latest
available version will be used. If set to false, virtualenv will
not be installed. Virtualenv will never be installed if the built-in
venv module is available.
80 |
# File 'lib/poise_python/resources/python_runtime.rb', line 80 attribute(:virtualenv_version, kind_of: [String, TrueClass, FalseClass], default: true) |
#wheel_version ⇒ String, Boolean
Version of Wheel to install. It set to true, the latest
available version will be used. If set to false, wheel will not
be installed.
86 |
# File 'lib/poise_python/resources/python_runtime.rb', line 86 attribute(:wheel_version, kind_of: [String, TrueClass, FalseClass], default: true) |
Instance Method Details
#python_binary ⇒ String
The path to the python binary for this Python installation. This is
an output property.
94 95 96 |
# File 'lib/poise_python/resources/python_runtime.rb', line 94 def python_binary provider_for_action(:python_binary).python_binary end |
#python_environment ⇒ Hash<String, String>
The environment variables for this Python installation. This is an output property.
106 107 108 |
# File 'lib/poise_python/resources/python_runtime.rb', line 106 def python_environment provider_for_action(:python_environment).python_environment end |