Library/Homebrew/language/python.rb
# Returns true if a formula option for the specified python is currently
# active or if the specified python is required by the formula. Valid
# inputs are "python", "python2", :python, and :python2. Note that
# "with-python", "without-python", "with-python@2", and "without-python@2"
# formula options are handled correctly even if not associated with any
# corresponding depends_on statement.
# @api private
Returns true if a formula option for the specified python is currently
active or if the specified python is required by the formula. Valid
inputs are "python", "python2", :python, and :python2.
Returns true if a formula option for the specified python is currently active or if the specified python is required by the formula . Valid inputs are " python " " python2 " : python and : python2 .
def needs_python?(python)
        return true if build.with?(python)
        (requirements.to_a | deps).any? { |r| r.name == python && r.required? }
      end
def needs_python? ( python ) return true if build . with? ( python ) ( requirements . to_a | deps ) . any? { | r | r . name == python && r . required? } end
Returns true if a formula option for the specified python is currently
active or if the specified python is required by the formula.
Returns true if a formula option for the specified python is currently active or if the specified python is required by the formula .
python
api
None