Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,22 @@ class BuildFailed(Exception):
def __init__(self, ext):
self.ext = ext

is_windows = sys.platform.startswith('win32')
is_macos = sys.platform.startswith('darwin')

murmur3_ext = Extension('cassandra.cmurmur3',
sources=['cassandra/cmurmur3.c'])

libev_includes = ['/usr/include/libev', '/usr/local/include', '/opt/local/include', '/usr/include']
libev_libdirs = ['/usr/local/lib', '/opt/local/lib', '/usr/lib64']
if is_macos:
libev_includes.extend(['/opt/homebrew/include', os.path.expanduser('~/homebrew/include')])
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just making the recent changes to support builds using Homebrew constrained to OSX builds only

libev_libdirs.extend(['/opt/homebrew/lib'])
libev_ext = Extension('cassandra.io.libevwrapper',
sources=['cassandra/io/libevwrapper.c'],
include_dirs=['/usr/include/libev', '/usr/local/include', '/opt/local/include', '/opt/homebrew/include', os.path.expanduser('~/homebrew/include')],
include_dirs=libev_includes,
libraries=['ev'],
library_dirs=['/usr/local/lib', '/opt/local/lib'])
library_dirs=libev_libdirs)

platform_unsupported_msg = \
"""
Expand All @@ -169,8 +176,6 @@ def __init__(self, ext):
=================================================================================
"""

is_windows = os.name == 'nt'

is_pypy = "PyPy" in sys.version
if is_pypy:
sys.stderr.write(pypy_unsupported_msg)
Expand Down