diff options
| author | Yacin Nadji | 2011-03-05 15:06:52 -0500 |
|---|---|---|
| committer | Adam Vandenberg | 2011-03-17 22:21:47 -0700 |
| commit | d7fb5a4fb0199cfbc6352b71531a9ed9bbd1a15a (patch) | |
| tree | 4622c333f6efd58e260de6c1fe3091e26261fa79 /Library/Formula/python.rb | |
| parent | 9ffb764f41319cd408a7fdbe5a10509b72a88fba (diff) | |
| download | homebrew-d7fb5a4fb0199cfbc6352b71531a9ed9bbd1a15a.tar.bz2 | |
Add option to python formula to remove poll
Apple's implementation of poll does not support devices, which causes socket
operations that rely on a properly functioning poll to fail with Errno 35 [2].
This creates an option to strip out poll entirely, which is what Apple does
for the binaries they package with the OS [1].
1: https://svn.macports.org/ticket/18376
2: http://bugs.python.org/issue5154
Signed-off-by: Adam Vandenberg <flangy@gmail.com>
Diffstat (limited to 'Library/Formula/python.rb')
| -rw-r--r-- | Library/Formula/python.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Library/Formula/python.rb b/Library/Formula/python.rb index cf17b0292..d7d22790c 100644 --- a/Library/Formula/python.rb +++ b/Library/Formula/python.rb @@ -14,6 +14,7 @@ There are a few options for customzing the build. --universal: Builds combined 32-/64-bit Intel binaries. --framework: Builds a "Framework" version of Python. --static: Builds static instead of shared libraries. + --no-poll: Don't include Apple's broken poll implementation. site-packages ------------- @@ -60,7 +61,8 @@ class Python < Formula [ ["--framework", "Do a 'Framework' build instead of a UNIX-style build."], ["--universal", "Build for both 32 & 64 bit Intel."], - ["--static", "Build static libraries."] + ["--static", "Build static libraries."], + ["--no-poll", "Remove HAVE_POLL.* options from build."] ] end @@ -121,6 +123,11 @@ class Python < Formula '#sqlite_defines.append(("SQLITE_OMIT_LOAD_EXTENSION", "1"))' system "./configure", *args + + if ARGV.include? '--no-poll' + inreplace 'pyconfig.h', /.*?(HAVE_POLL[_A-Z]*).*/, '#undef \1' + end + system "make" ENV.j1 # Installs must be serialized system "make install" |
