Class: PoisePython::PythonProviders::Msi

Inherits:
Base
  • Object
show all
Defined in:
lib/poise_python/python_providers/msi.rb

Overview

Since:

  • 1.0.0

Constant Summary collapse

MSI_VERSIONS =

Since:

  • 1.0.0

%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

Returns:

  • (Boolean)

Since:

  • 1.0.0



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_binaryObject

Since:

  • 1.0.0



36
37
38
39
40
41
42
43
# File 'lib/poise_python/python_providers/msi.rb', line 36

def python_binary
  return options['python_binary'] if options['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