From 8ccb999ac04fa9fcb4df521004be5eeff9fd8ba6 Mon Sep 17 00:00:00 2001 From: Michka Popoff Date: Wed, 7 Feb 2018 22:44:38 +0100 Subject: [PATCH] test.rb: Add python to PATH in test env Python is now a regular dependency, looking for it in the requirements does not work anymore. Closes Linuxbrew/brew#593. Signed-off-by: Michka Popoff --- Library/Homebrew/test.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Library/Homebrew/test.rb b/Library/Homebrew/test.rb index d1e7473cb56..d5a71868272 100644 --- a/Library/Homebrew/test.rb +++ b/Library/Homebrew/test.rb @@ -21,8 +21,9 @@ else ENV.setup_build_environment(formula) # Add the python executable to the PATH. - req = formula.recursive_requirements.grep(PythonRequirement).first - req&.modify_build_environment + if formula.deps.map(&:name).include? "python" + ENV.append_path "PATH", "#{HOMEBREW_PREFIX}/opt/python/libexec/bin" + end end trap("INT", old_trap)