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.
This commit is contained in:
parent
6b299c4207
commit
e143c3a799
@ -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) &&
|
if !filtered_python_reqs.map{ |fpr| fpr.binary }.include?(py.binary) &&
|
||||||
py.satisfied? &&
|
py.satisfied? &&
|
||||||
options[:allowed_major_versions].include?(py.version.major) &&
|
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
|
then
|
||||||
filtered_python_reqs << py
|
filtered_python_reqs << py
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user