class PoisePython::PythonProviders::System
Public Instance Methods
python_binary()
click to toggle source
Output value for the Python binary we are installing. Seems to match package name on all platforms I've checked.
# File lib/poise_python/python_providers/system.rb, line 52 def python_binary ::File.join('', 'usr', 'bin', system_package_name) end
Private Instance Methods
install_python()
click to toggle source
# File lib/poise_python/python_providers/system.rb, line 58 def install_python install_system_packages end
system_package_candidates(version)
click to toggle source
# File lib/poise_python/python_providers/system.rb, line 66 def system_package_candidates(version) [].tap do |names| # For two (or more) digit versions. if match = version.match(/^(\d+\.\d+)/) # Debian style pythonx.y names << "python#{match[1]}" # Amazon style pythonxy names << "python#{match[1].gsub(/\./, '')}" end # Aliases for 2 and 3. if version == '3' || version == '' names.concat(%w{python3.5 python35 python3.4 python34 python3.3 python33 python3.2 python32 python3.1 python31 python3.0 python30 python3}) end if version == '2' || version == '' names.concat(%w{python2.7 python27 python2.6 python26 python2.5 python25}) end # For RHEL and friends. names << 'python' names.uniq! end end
uninstall_python()
click to toggle source
# File lib/poise_python/python_providers/system.rb, line 62 def uninstall_python uninstall_system_packages end