diff options
| author | Max Howell | 2012-10-01 09:37:42 -0400 |
|---|---|---|
| committer | Max Howell | 2012-10-01 09:40:40 -0400 |
| commit | 3cb7a02beb4d66e195b9e1ca420e0b292fa595c4 (patch) | |
| tree | b48959b3d9e12fe3172b817c0769f131744b7e6c /Library | |
| parent | b30454d3bee49dd6dbf16cd0322f0ec454745e03 (diff) | |
| download | brew-3cb7a02beb4d66e195b9e1ca420e0b292fa595c4.tar.bz2 | |
superenv: Add brewed-python bin to PATH
A required special case since formula that use python can optionally use system python or Homebrew python. We'll probably need more of this sort of thing.
Diffstat (limited to 'Library')
| -rw-r--r-- | Library/Homebrew/superenv.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index 668d62aa1..81d5b3c31 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -106,6 +106,7 @@ class << ENV paths << "#{MacSystem.xcode43_developer_dir}/Toolchains/XcodeDefault.xctoolchain/usr/bin" end paths += all_deps.map{|dep| "#{HOMEBREW_PREFIX}/opt/#{dep}/bin" } + paths << "#{HOMEBREW_PREFIX}/opt/python/bin" if brewed_python? paths << "#{MacSystem.x11_prefix}/bin" if x11? paths += %w{/usr/bin /bin /usr/sbin /sbin} paths.to_path_s @@ -137,7 +138,7 @@ class << ENV paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2' if MacSystem.xcode43_without_clt? paths << "#{sdk}/usr/include/apache2" - paths << if Formula.factory('python').linked_keg.directory? + paths << if brewed_python? "#{HOMEBREW_PREFIX}/opt/python/Frameworks/Python.framework/Headers" else "#{sdk}/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7" @@ -193,6 +194,11 @@ class << ENV end end + def brewed_python? + require 'formula' + Formula.factory('python').linked_keg.directory? + end + public ### NO LONGER NECESSARY OR NO LONGER SUPPORTED |
