formula_installer: bottle against Homebrew Python.
This commit is contained in:
parent
cf8f8dec1f
commit
2404de68d4
@ -58,14 +58,6 @@ class FormulaInstaller
|
|||||||
return true if f.local_bottle_path
|
return true if f.local_bottle_path
|
||||||
return false unless f.bottle && f.pour_bottle?
|
return false unless f.bottle && f.pour_bottle?
|
||||||
|
|
||||||
f.requirements.each do |req|
|
|
||||||
next if req.optional? || req.pour_bottle?
|
|
||||||
if install_bottle_options[:warn]
|
|
||||||
ohai "Building source; bottle blocked by #{req} requirement"
|
|
||||||
end
|
|
||||||
return false
|
|
||||||
end
|
|
||||||
|
|
||||||
unless f.bottle.compatible_cellar?
|
unless f.bottle.compatible_cellar?
|
||||||
if install_bottle_options[:warn]
|
if install_bottle_options[:warn]
|
||||||
opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}"
|
opoo "Building source; cellar of #{f}'s bottle is #{f.bottle.cellar}"
|
||||||
@ -247,6 +239,13 @@ class FormulaInstaller
|
|||||||
raise UnsatisfiedRequirements.new(f, fatals) unless fatals.empty?
|
raise UnsatisfiedRequirements.new(f, fatals) unless fatals.empty?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def install_requirement_default_formula?(req)
|
||||||
|
return false unless req.default_formula?
|
||||||
|
return false if req.optional?
|
||||||
|
return true unless req.satisfied?
|
||||||
|
pour_bottle? || build_bottle?
|
||||||
|
end
|
||||||
|
|
||||||
def expand_requirements
|
def expand_requirements
|
||||||
unsatisfied_reqs = Hash.new { |h, k| h[k] = [] }
|
unsatisfied_reqs = Hash.new { |h, k| h[k] = [] }
|
||||||
deps = []
|
deps = []
|
||||||
@ -263,13 +262,13 @@ class FormulaInstaller
|
|||||||
Requirement.prune
|
Requirement.prune
|
||||||
elsif req.build? && dependent != f && install_bottle_for_dep?(dependent, build)
|
elsif req.build? && dependent != f && install_bottle_for_dep?(dependent, build)
|
||||||
Requirement.prune
|
Requirement.prune
|
||||||
elsif req.satisfied?
|
elsif install_requirement_default_formula?(req)
|
||||||
Requirement.prune
|
|
||||||
elsif req.default_formula?
|
|
||||||
dep = req.to_dependency
|
dep = req.to_dependency
|
||||||
deps.unshift(dep)
|
deps.unshift(dep)
|
||||||
formulae.unshift(dep.to_formula)
|
formulae.unshift(dep.to_formula)
|
||||||
Requirement.prune
|
Requirement.prune
|
||||||
|
elsif req.satisfied?
|
||||||
|
Requirement.prune
|
||||||
else
|
else
|
||||||
unsatisfied_reqs[dependent] << req
|
unsatisfied_reqs[dependent] << req
|
||||||
end
|
end
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user