diff options
| author | samueljohn | 2012-08-15 11:51:20 +0200 |
|---|---|---|
| committer | Jack Nagel | 2012-08-18 22:57:00 -0500 |
| commit | 3378deda040e8fc38bee4564b72f2edd9600aa79 (patch) | |
| tree | a8c29ddc577274d50cedef6291255e43df8ed17a | |
| parent | e9c07b09c0cfbf6e973e32f273a1fa3f8974387d (diff) | |
| download | homebrew-3378deda040e8fc38bee4564b72f2edd9600aa79.tar.bz2 | |
python: ENV.minimal_optimization. Remove 2to3 fix
- Extras now in HOMEBREW_PREFIX/share/python/Extras instead of
HOMEBREW_PREFIX/share/python2.7/Extras
- Assure no '-march=...' or '-msse4' or similar flags are there
because `python-config --cflags` reports them later and can
break certain c-extensions. (happend for SciPy).
Closes #14199.
Signed-off-by: Jack Nagel <jacknagel@gmail.com>
| -rw-r--r-- | Library/Formula/python.rb | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index ef677ff30..a5f5db2f3 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -67,10 +67,17 @@ class Python < Formula --enable-ipv6 --datarootdir=#{share} --datadir=#{share} - --without-gcc --enable-framework=#{prefix}/Frameworks ] + args << '--without-gcc' if ENV.compiler == :clang + + # Don't use optimizations other than "-Os" here, because Python's distutils + # remembers (hint: `python-config --cflags`) and reuses them for C + # extensions which can break software (such as scipy 0.11 fails when + # "-msse4" is present.) + ENV.minimal_optimization + # We need to enable warnings because the configure.in uses -Werror to detect # "whether gcc supports ParseTuple" (https://github.com/mxcl/homebrew/issues/12194) ENV.enable_warnings @@ -78,7 +85,6 @@ class Python < Formula # http://docs.python.org/devguide/setup.html#id8 suggests to disable some Warnings. ENV.append_to_cflags '-Wno-unused-value' ENV.append_to_cflags '-Wno-empty-body' - ENV.append_to_cflags '-Qunused-arguments' end if build.universal? @@ -99,8 +105,8 @@ class Python < Formula ENV.deparallelize # Installs must be serialized # Tell Python not to install into /Applications (default for framework builds) system "make", "install", "PYTHONAPPSDIR=#{prefix}" - # Demos and Tools into HOMEBREW_PREFIX/share/python2.7 - system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{share}/python2.7" + # Demos and Tools into HOMEBREW_PREFIX/share/python + system "make", "frameworkinstallextras", "PYTHONAPPSDIR=#{share}/python" system "make", "quicktest" if build.include? 'quicktest' # Post-install, fix up the site-packages and install-scripts folders @@ -114,10 +120,6 @@ class Python < Formula # Symlink the prefix site-packages into the cellar. ln_s site_packages, site_packages_cellar - # Python 3 has a 2to3, too. Additionally there still is a 2to3-2.7. - # (https://github.com/mxcl/homebrew/issues/12581) - rm bin/"2to3" if (HOMEBREW_PREFIX/"bin/2to3").exist? and (bin/"2to3").exist? - # Tell distutils-based installers where to put scripts scripts_folder.mkpath (effective_lib+"python2.7/distutils/distutils.cfg").write <<-EOF.undent @@ -136,7 +138,7 @@ class Python < Formula #{prefix}/Frameworks/Python.framework You can find the Python demo at - #{HOMEBREW_PREFIX}/share/python2.7/Extras + #{HOMEBREW_PREFIX}/share/python/Extras You can `brew linkapps` to symlink "Idle" and the "Python Launcher". |
