aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMisty De Meo2013-06-26 01:22:39 -0500
committerMisty De Meo2013-06-26 01:22:39 -0500
commit93eeffdcd8b47c485bb2beefd489f5eaa7393637 (patch)
treed4211deab51079aa4cfa36534cc5a244e88d5029
parent942b7319f90459e2a32090c63476a0eb1385357c (diff)
downloadhomebrew-93eeffdcd8b47c485bb2beefd489f5eaa7393637.tar.bz2
Python: fix LINKFORSHARED value
LINKFORSHARED incorrectly returns a truncated value by default, which breaks builds which depend on it returning a valid path. e.g., it returns: Python.framework/Versions/2.7/Python Instead of: $(brew --prefix)/Python.framework/Versions/2.7/Python This breaks zpython, and possibly other things. See #20182. Reported to Python.org in http://bugs.python.org/issue3588 and http://bugs.python.org/issue16848, fixed for python-config but not other usecases.
-rw-r--r--Library/Formula/python.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 1404f3b7a..6a4525abc 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -155,6 +155,13 @@ class Python < Formula
import _sre
_sre.MAXREPEAT = 65535 # this monkey-patches all other places of "from _sre import MAXREPEAT"'
EOS
+
+ # Fixes setting Python build flags for certain software
+ # See: https://github.com/mxcl/homebrew/pull/20182
+ # http://bugs.python.org/issue3588
+ inreplace "#{prefix}/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile",
+ "LINKFORSHARED= -u _PyMac_Error $(PYTHONFRAMEWORKDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)",
+ "LINKFORSHARED= -u _PyMac_Error $(PYTHONFRAMEWORKINSTALLDIR)/Versions/$(VERSION)/$(PYTHONFRAMEWORK)"
end
def distutils_fix_superenv(args)