diff options
Diffstat (limited to 'Library/Homebrew/requirements/python_requirement.rb')
| -rw-r--r-- | Library/Homebrew/requirements/python_requirement.rb | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Library/Homebrew/requirements/python_requirement.rb b/Library/Homebrew/requirements/python_requirement.rb index df9d7328c..1fb1045f0 100644 --- a/Library/Homebrew/requirements/python_requirement.rb +++ b/Library/Homebrew/requirements/python_requirement.rb @@ -39,9 +39,17 @@ class PythonRequirement < Requirement Pathname.new Utils.popen_read(python, "-c", "import sys; print(sys.executable)").strip end - def system_python; "/usr/bin/#{python_binary}" end - def system_python?; system_python == which_python.to_s end - def python_binary; "python" end + def system_python + "/usr/bin/#{python_binary}" + end + + def system_python? + system_python == which_python.to_s + end + + def python_binary + "python" + end # Deprecated alias_method :to_s, :python_binary @@ -54,5 +62,7 @@ class Python3Requirement < PythonRequirement satisfy(:build_env => false) { which_python } - def python_binary; "python3" end + def python_binary + "python3" + end end |
