aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Homebrew
diff options
context:
space:
mode:
authorTim D. Smith2014-12-10 00:29:11 -0800
committerTim D. Smith2014-12-10 14:18:23 -0800
commitfe16f36f3c19a29c5edfec4483d14b09cefdc175 (patch)
treee4b2afea8a21515dc7f9bfbde3038e293dd8fdc2 /Library/Homebrew
parent99848607b2cb2bdf28f9df3edc6f50b3c2933f11 (diff)
downloadbrew-fe16f36f3c19a29c5edfec4483d14b09cefdc175.tar.bz2
Formula#exec_cmd: recognize setuptools shim and refurbish args
Diffstat (limited to 'Library/Homebrew')
-rw-r--r--Library/Homebrew/formula.rb8
1 files changed, 6 insertions, 2 deletions
diff --git a/Library/Homebrew/formula.rb b/Library/Homebrew/formula.rb
index 4dad76fdc..36c93e7df 100644
--- a/Library/Homebrew/formula.rb
+++ b/Library/Homebrew/formula.rb
@@ -661,8 +661,12 @@ class Formula
# Turn on argument filtering in the superenv compiler wrapper.
# We should probably have a better mechanism for this than adding
# special cases to this method.
- if cmd == "python" && %w[setup.py build.py].include?(args.first)
- ENV.refurbish_args
+ if cmd == "python"
+ setup_py_in_args = %w[setup.py build.py].include?(args.first)
+ setuptools_shim_in_args = args.any? { |a| a.start_with? "import setuptools" }
+ if setup_py_in_args || setuptools_shim_in_args
+ ENV.refurbish_args
+ end
end
$stdout.reopen(out)