Skip to content

Commit

Permalink
python_dependency: cleanup, fix satisfy.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Jan 21, 2014
1 parent 6c99f92 commit fc51837
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 deletions Library/Homebrew/requirements/python_dependency.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ class PythonDependency < Requirement
fatal true

satisfy :build_env => false do
which python_binary
which 'python'
end

def modify_build_environment
Expand All @@ -13,30 +13,14 @@ def modify_build_environment

# Deprecated
def to_s
python_binary
end

protected

def python_binary
'python'
end

def system_python?
which(python_binary).to_s == "/usr/bin/python"
end
end

class Python3Dependency < PythonDependency
default_formula 'python3'

protected

def python_binary
'python3'
end

def system_python?
false
satisfy :build_env => false do
which 'python3'
end
end

0 comments on commit fc51837

Please sign in to comment.