Remove more nesting in python_helper
This commit is contained in:
parent
eafa7a141d
commit
53c97c3c96
@ -55,9 +55,8 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
|
|||||||
filtered_python_reqs.sort_by{ |py| py.version }.map do |py|
|
filtered_python_reqs.sort_by{ |py| py.version }.map do |py|
|
||||||
# Now is the time to set the site_packages to the correct value
|
# Now is the time to set the site_packages to the correct value
|
||||||
py.site_packages = lib/py.xy/'site-packages'
|
py.site_packages = lib/py.xy/'site-packages'
|
||||||
if !block_given?
|
return py if !block_given?
|
||||||
return py
|
|
||||||
else
|
|
||||||
puts "brew: Python block (#{py.binary})..." if ARGV.verbose? && ARGV.debug?
|
puts "brew: Python block (#{py.binary})..." if ARGV.verbose? && ARGV.debug?
|
||||||
# Ensure env changes are only temporary
|
# Ensure env changes are only temporary
|
||||||
begin
|
begin
|
||||||
@ -86,5 +85,4 @@ def python_helper(options={:allowed_major_versions => [2, 3]}, &block)
|
|||||||
ENV.replace(old_env)
|
ENV.replace(old_env)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user