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
-
#get_pip_url ⇒ String
URL to download the get-pip.py script from.
-
#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
python
binary for this Python installation. -
#python_environment ⇒ Hash<String, String>
The environment variables for this Python installation.
Instance Attribute Details
#get_pip_url ⇒ String
URL to download the get-pip.py script from. If not sure, the default
of https://bootstrap.pypa.io/get-pip.py is used. If you want to skip
the pip installer entirely, set #pip_version to false
.
55 |
# File 'lib/poise_python/resources/python_runtime.rb', line 55 attribute(:get_pip_url, kind_of: String, default: 'https://bootstrap.pypa.io/get-pip.py') |
#pip_version ⇒ String, Boolean
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 instead of
#get_pip_url.
64 |
# File 'lib/poise_python/resources/python_runtime.rb', line 64 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.
70 |
# File 'lib/poise_python/resources/python_runtime.rb', line 70 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.
79 |
# File 'lib/poise_python/resources/python_runtime.rb', line 79 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.
85 |
# File 'lib/poise_python/resources/python_runtime.rb', line 85 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.
93 94 95 |
# File 'lib/poise_python/resources/python_runtime.rb', line 93 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.
105 106 107 |
# File 'lib/poise_python/resources/python_runtime.rb', line 105 def python_environment provider_for_action(:python_environment).python_environment end |