diff options
| author | Samuel John | 2013-05-24 20:10:54 +0200 |
|---|---|---|
| committer | Samuel John | 2013-05-24 20:10:54 +0200 |
| commit | b8e7f3cd15fe87be4f56bca4c633396037a7a670 (patch) | |
| tree | 2f67177f4542a50f7d8ef6b46d7baa2bd05240a4 /Library/Formula | |
| parent | d6ecdb90a966bdb8196c97b2fb12554a2ede1164 (diff) | |
| download | homebrew-b8e7f3cd15fe87be4f56bca4c633396037a7a670.tar.bz2 | |
python: Fix #19300 MAXREPEAT issue with system vim
Related:
http://bugs.python.org/issue18050
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/python.rb | 10 |
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? |
