Skip to content
Snippets Groups Projects
Commit e143c3a7 authored by Samuel John's avatar Samuel John
Browse files

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.
parent 6b299c42
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment