From 3cb7a02beb4d66e195b9e1ca420e0b292fa595c4 Mon Sep 17 00:00:00 2001 From: Max Howell Date: Mon, 1 Oct 2012 09:37:42 -0400 Subject: 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.--- Library/Homebrew/superenv.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Library') 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 -- cgit v1.2.3