Skip to content

Commit d026cec

Browse files
absurdfarcedkropachev
authored andcommitted
PYTHON-1378 Expand search directories for includes (datastax#1198)
1 parent 4ffa37c commit d026cec

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

setup.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ class BuildFailed(Exception):
131131
def __init__(self, ext):
132132
self.ext = ext
133133

134+
is_windows = sys.platform.startswith('win32')
135+
is_macos = sys.platform.startswith('darwin')
134136

135137
def get_subdriname(directory_path):
136138
try:
@@ -160,8 +162,6 @@ def get_libev_headers_path():
160162
murmur3_ext = Extension('cassandra.cmurmur3',
161163
sources=['cassandra/cmurmur3.c'])
162164

163-
is_macos = sys.platform.startswith('darwin')
164-
165165
libev_includes = ['/usr/include/libev', '/usr/local/include', '/opt/local/include', '/usr/include']
166166
libev_libdirs = ['/usr/local/lib', '/opt/local/lib', '/usr/lib64']
167167
if is_macos:
@@ -176,9 +176,9 @@ def get_libev_headers_path():
176176

177177
libev_ext = Extension('cassandra.io.libevwrapper',
178178
sources=['cassandra/io/libevwrapper.c'],
179-
include_dirs=libev_includes+['/usr/include/libev', '/usr/local/include', '/opt/local/include'],
179+
include_dirs=libev_includes,
180180
libraries=['ev'],
181-
library_dirs=libev_libdirs+['/usr/local/lib', '/opt/local/lib'])
181+
library_dirs=libev_libdirs)
182182

183183
platform_unsupported_msg = \
184184
"""
@@ -201,8 +201,6 @@ def get_libev_headers_path():
201201
=================================================================================
202202
"""
203203

204-
is_windows = os.name == 'nt'
205-
206204
is_pypy = "PyPy" in sys.version
207205
if is_pypy:
208206
sys.stderr.write(pypy_unsupported_msg)

0 commit comments

Comments
 (0)