From 532c849b58690b3dd400b852d4bfb9c739f8c2cf Mon Sep 17 00:00:00 2001 From: samueljohn Date: Sun, 23 Sep 2012 12:15:46 +0200 Subject: python goes superenv - Install a sitecustomize.py that is only executed for brewed python to - Fix the prefix, python thinks it is installed to. (Remember, Python thinks it lives in the Cellar) - Remove "/System/..." stuff from sys.path which caused a lot of install trouble because setuptools has the habbit to inject itself upfront, overwriting our distribute. - Allow --with-poll and don't say, we didn't warn you. - Don't need depends_on :x11 any longer. Yeah, no XQuartz! - Add --with-brewed-openssl - pip 1.2.1 - pip, pip-2.7, easy_install and easy_install-2.7 are installed to prefix, such that they are directly available, even if people have not set their PATH to include $(brew --prefix)/share/python - Caveats shorter and clear. - For Xcode-only: - Patch the distutils buildsystem to use "xcrun cc" etc. - Teach distutils the MacOS.sdk_path (for incs and libs) - superenv.rb add the right python include dir depending on whether a brewed python is installed or not. Closes Homebrew/homebrew#15064. Signed-off-by: Max Howell --- Library/Homebrew/superenv.rb | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Library') diff --git a/Library/Homebrew/superenv.rb b/Library/Homebrew/superenv.rb index d6d90a168..668d62aa1 100644 --- a/Library/Homebrew/superenv.rb +++ b/Library/Homebrew/superenv.rb @@ -137,8 +137,11 @@ class << ENV paths << "#{sdk}/usr/include/libxml2" unless deps.include? 'libxml2' if MacSystem.xcode43_without_clt? paths << "#{sdk}/usr/include/apache2" - # TODO prolly shouldn't always do this? - paths << "#{sdk}/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7" + paths << if Formula.factory('python').linked_keg.directory? + "#{HOMEBREW_PREFIX}/opt/python/Frameworks/Python.framework/Headers" + else + "#{sdk}/System/Library/Frameworks/Python.framework/Versions/Current/include/python2.7" + end end paths << "#{sdk}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers/" unless x11? paths << "#{MacSystem.x11_prefix}/include" if x11? -- cgit v1.2.3