diff options
| author | Mike McQuaid | 2017-07-23 15:21:01 +0100 |
|---|---|---|
| committer | GitHub | 2017-07-23 15:21:01 +0100 |
| commit | a947bfbf47a5d314ab689681c6ef0c42a66ec246 (patch) | |
| tree | b8c3fe4229c38f8b7e4eb408e9b50f7a10394964 | |
| parent | 24f47976db4e72bcdd73ddaa1b2c379dce917cd5 (diff) | |
| parent | acb418c4881a2f9c9cef96ad3ee4063134d1b63b (diff) | |
| download | brew-a947bfbf47a5d314ab689681c6ef0c42a66ec246.tar.bz2 | |
Merge pull request #2922 from MikeMcQuaid/config-libexec-python
system_config: look for python formula binary.
| -rw-r--r-- | Library/Homebrew/system_config.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Homebrew/system_config.rb b/Library/Homebrew/system_config.rb index f89c79306..5663295c2 100644 --- a/Library/Homebrew/system_config.rb +++ b/Library/Homebrew/system_config.rb @@ -77,7 +77,14 @@ class SystemConfig end 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? python_binary = Utils.popen_read python, "-c", "import sys; sys.stdout.write(sys.executable)" python_binary = Pathname.new(python_binary).realpath |
