Skip to content

Commit f1c08be

Browse files
committed
updated setup for new sweep
1 parent 1a635aa commit f1c08be

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

setup.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44

55
from setuptools import setup, Extension, find_packages
66
from setuptools.command.build_ext import build_ext
7+
import numpy
78

89
libraries = ['usb-1.0']
910

10-
FILES = list(Path('python_hackrf/libhackrf').rglob('*.pyx'))
11+
LIBHACKRF_FILES = list(Path('python_hackrf/libhackrf').rglob('*.pyx'))
12+
PYHACKrF_TOOLS_FILES = list(Path('python_hackrf/pyhackrf_tools').rglob('*.pyx'))
1113

1214
INSTALL_REQUIRES = []
1315
SETUP_REQUIRES = []
@@ -36,16 +38,16 @@
3638
pass
3739
else:
3840
libraries = ['usb1.0']
39-
FILES = [fn.with_suffix('.c') for fn in FILES]
41+
LIBHACKRF_FILES = [fn.with_suffix('.c') for fn in LIBHACKRF_FILES]
4042

41-
source_files = [str(fn) for fn in FILES]
43+
source_files = [str(fn) for fn in LIBHACKRF_FILES]
4244
source_files.append('python_hackrf/libhackrf/hackrf.c')
4345

4446
setup(
4547
name='python_hackrf',
4648
author='Leonid Gvozdev',
4749
author_email='[email protected]',
48-
version='1.0.3',
50+
version='1.0.4',
4951
cmdclass={'build_ext': build_ext},
5052
install_requires=INSTALL_REQUIRES,
5153
setup_requires=SETUP_REQUIRES,
@@ -54,9 +56,15 @@
5456
name='python_hackrf.libhackrf.pyhackrf',
5557
sources=source_files,
5658
libraries=libraries,
57-
include_dirs=['python_hackrf/libhackrf'],
59+
include_dirs=['python_hackrf/libhackrf', numpy.get_include()],
5860
define_macros=[("LIBRARY_VERSION", f'"{LIBRARY_VERSION}"'), ("LIBRARY_RELEASE", f'"{LIBRARY_RELEASE}"')],
5961
extra_compile_args=['-w'],
62+
),
63+
Extension(
64+
name='python_hackrf.pyhackrf_tools.pyhackrf_sweep',
65+
sources=[str(fn) for fn in PYHACKrF_TOOLS_FILES],
66+
include_dirs=['python_hackrf/pyhackrf_tools', numpy.get_include()],
67+
extra_compile_args=['-w'],
6068
)
6169
],
6270
packages=find_packages(),

0 commit comments

Comments
 (0)