aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/python.rb
diff options
context:
space:
mode:
Diffstat (limited to 'Library/Formula/python.rb')
-rw-r--r--Library/Formula/python.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb
index 356944460..7cba22722 100644
--- a/Library/Formula/python.rb
+++ b/Library/Formula/python.rb
@@ -164,6 +164,16 @@ class Python < Formula
install-lib=#{site_packages}
EOF
+ # Work-around this bug: http://bugs.python.org/issue18050
+ inreplace "#{prefix}/Frameworks/Python.framework/Versions/2.7/lib/python2.7/re.py", 'import sys', <<-EOS.undent
+ import sys
+ try:
+ from _sre import MAXREPEAT
+ except ImportError:
+ import _sre
+ _sre.MAXREPEAT = 65535 # this monkey-patches all other places of "from _sre import MAXREPEAT"'
+ EOS
+
makefile = prefix/'Frameworks/Python.framework/Versions/2.7/lib/python2.7/config/Makefile'
inreplace makefile do |s|
unless MacOS::CLT.installed?