Merge pull request #2922 from MikeMcQuaid/config-libexec-python
system_config: look for python formula binary.
This commit is contained in:
commit
a947bfbf47
@ -77,7 +77,14 @@ class SystemConfig
|
|||||||
end
|
end
|
||||||
|
|
||||||
def describe_python
|
def describe_python
|
||||||
python = which "python"
|
python = begin
|
||||||
|
python_path = PATH.new(ENV["HOMEBREW_PATH"])
|
||||||
|
.prepend(Formula["python"].opt_libexec/"bin")
|
||||||
|
which "python", python_path
|
||||||
|
rescue FormulaUnavailableError
|
||||||
|
which "python"
|
||||||
|
end
|
||||||
|
|
||||||
return "N/A" if python.nil?
|
return "N/A" if python.nil?
|
||||||
python_binary = Utils.popen_read python, "-c", "import sys; sys.stdout.write(sys.executable)"
|
python_binary = Utils.popen_read python, "-c", "import sys; sys.stdout.write(sys.executable)"
|
||||||
python_binary = Pathname.new(python_binary).realpath
|
python_binary = Pathname.new(python_binary).realpath
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user