Class: PoisePython::PythonProviders::Msi
- Defined in:
- lib/poise_python/python_providers/msi.rb
Overview
Constant Summary collapse
- MSI_VERSIONS =
%w{3.4.4 3.3.5 3.2.5 3.1.4 3.0.1 2.7.10 2.6.5 2.5.4}
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.provides_auto?(node, resource) ⇒ Boolean
30 31 32 33 34 |
# File 'lib/poise_python/python_providers/msi.rb', line 30 def self.provides_auto?(node, resource) # Only enable by default on Windows and not for Python 3.5 because that # uses the win_binaries provider. node.platform_family?('windows') #&& resource.version != '3' && ::Gem::Requirement.create('< 3.5').satisfied_by(::Gem::Version.create(new_resource.version)) end |
Instance Method Details
#python_binary ⇒ Object
36 37 38 39 40 41 42 43 |
# File 'lib/poise_python/python_providers/msi.rb', line 36 def python_binary return ['python_binary'] if ['python_binary'] if package_version =~ /^(\d+)\.(\d+)\./ ::File.join(ENV['SystemDrive'], "Python#{$1}#{$2}", 'python.exe') else raise "Can't find Python binary for #{package_version}" end end |