Skip to content

Commit e8ed4cc

Browse files
committed
added default paths
1 parent a4f154f commit e8ed4cc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

setup.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,20 @@
2929
cflags = environ.get('CFLAGS', '')
3030
ldflags = environ.get('LDFLAGS', '')
3131

32-
if PLATFORM in ('linux', 'darwin'):
32+
if PLATFORM in {'linux', 'darwin'}:
3333
if environ.get('PYTHON_HACKRF_CFLAGS', None) is None:
3434
try:
3535
new_cflags = subprocess.check_output(['pkg-config', '--cflags', 'libhackrf']).decode('utf-8').strip()
3636
except Exception:
37-
new_cflags = ''
37+
new_cflags = '-I/opt/homebrew/include/libhackrf -I/opt/local/include/libhackrf -I/usr/include/libhackrf -I/usr/include/libhackrf -I/usr/local/include/libhackrf'
3838
else:
3939
new_cflags = environ.get('PYTHON_HACKRF_CFLAGS', '')
4040

4141
if environ.get('PYTHON_HACKRF_LDFLAGS', None) is None:
4242
try:
4343
new_ldflags = subprocess.check_output(['pkg-config', '--libs', 'libhackrf']).decode('utf-8').strip()
4444
except Exception:
45-
new_ldflags = ''
45+
new_ldflags = '-L/opt/homebrew/lib -L/opt/local/lib -L/usr/lib64 -L/usr/lib -L/usr/local/lib -L/usr/local/lib64'
4646
else:
4747
new_ldflags = environ.get('PYTHON_HACKRF_LDFLAGS', '')
4848

@@ -87,7 +87,7 @@
8787
sources=['python_hackrf/pyhackrf_tools/pyhackrf_transfer.pyx'],
8888
include_dirs=['python_hackrf/pyhackrf_tools', numpy.get_include()],
8989
extra_compile_args=['-w'],
90-
)
90+
),
9191
],
9292
packages=find_packages(),
9393
package_dir={'': '.'},

0 commit comments

Comments
 (0)