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 <mxcl@me.com>
This commit is contained in:
samueljohn 2012-09-23 12:15:46 +02:00 committed by Max Howell
parent 36dc701cfb
commit 532c849b58

View File

@ -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?