aboutsummaryrefslogtreecommitdiffstats
path: root/Library
diff options
context:
space:
mode:
authorMike McQuaid2014-02-10 14:45:08 +0000
committerMike McQuaid2014-02-10 18:49:26 +0000
commitf42f4e45c15d68ae44553aa01088c78b0aa14a6f (patch)
tree9978b3d345832af1349d5e9be2d64db56b732302 /Library
parentb754ad0d0b313fa478e427fa99e014c3357db0d3 (diff)
downloadbrew-f42f4e45c15d68ae44553aa01088c78b0aa14a6f.tar.bz2
python_dependency: only set PYTHONPATH for system.
Diffstat (limited to 'Library')
-rw-r--r--Library/Homebrew/requirements/python_dependency.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/Library/Homebrew/requirements/python_dependency.rb b/Library/Homebrew/requirements/python_dependency.rb
index 5fe51efda..586821f6c 100644
--- a/Library/Homebrew/requirements/python_dependency.rb
+++ b/Library/Homebrew/requirements/python_dependency.rb
@@ -12,11 +12,11 @@ class PythonDependency < Requirement
end
def modify_build_environment
- if python_binary == 'python'
- ENV['PYTHONPATH'] = "#{HOMEBREW_PREFIX}/lib/python2.7/site-packages"
- end
-
- if !system_python? && which_python
+ if system_python?
+ if python_binary == 'python'
+ ENV['PYTHONPATH'] = "#{HOMEBREW_PREFIX}/lib/python2.7/site-packages"
+ end
+ elsif which_python
ENV.prepend_path 'PATH', which_python.dirname
end
end