aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorSamuel John2013-07-15 21:28:37 +0200
committerSamuel John2013-07-15 21:28:37 +0200
commite143c3a799b531d6b3793f7bb677652f418d7a46 (patch)
tree6934375d43d60f336ee35d43fbd45363357cb357 /Library
parent6b299c42076658bbe80d3df83ff814bec545e365 (diff)
downloadbrew-e143c3a799b531d6b3793f7bb677652f418d7a46.tar.bz2
Fix multiple execution of python do ... end blocks
Only run the `python do ... end` loop once even if multiple `depends_on :python => 'module-name'` are present.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/python_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/Library/Homebrew/python_helper.rb b/Library/Homebrew/python_helper.rb
index 13ff28348..b121ca5d7 100644
--- a/Library/Homebrew/python_helper.rb
+++ b/Library/Homebrew/python_helper.rb
@@ -39,7 +39,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
if !filtered_python_reqs.map{ |fpr| fpr.binary }.include?(py.binary) &&
py.satisfied? &&
options[:allowed_major_versions].include?(py.version.major) &&
- self.build.with?(py.name) || !(py.optional? || py.recommended?)
+ # if optional or recommended then check the build.with?
+ (self.build.with?(py.name) || !(py.optional? || py.recommended?))
then
filtered_python_reqs << py
end