|
4 | 4 |
|
5 | 5 | from setuptools import setup, Extension, find_packages |
6 | 6 | from setuptools.command.build_ext import build_ext |
| 7 | +import numpy |
7 | 8 |
|
8 | 9 | libraries = ['usb-1.0'] |
9 | 10 |
|
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')) |
11 | 13 |
|
12 | 14 | INSTALL_REQUIRES = [] |
13 | 15 | SETUP_REQUIRES = [] |
|
36 | 38 | pass |
37 | 39 | else: |
38 | 40 | 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] |
40 | 42 |
|
41 | | -source_files = [str(fn) for fn in FILES] |
| 43 | +source_files = [str(fn) for fn in LIBHACKRF_FILES] |
42 | 44 | source_files.append('python_hackrf/libhackrf/hackrf.c') |
43 | 45 |
|
44 | 46 | setup( |
45 | 47 | name='python_hackrf', |
46 | 48 | author='Leonid Gvozdev', |
47 | 49 | |
48 | | - version='1.0.3', |
| 50 | + version='1.0.4', |
49 | 51 | cmdclass={'build_ext': build_ext}, |
50 | 52 | install_requires=INSTALL_REQUIRES, |
51 | 53 | setup_requires=SETUP_REQUIRES, |
|
54 | 56 | name='python_hackrf.libhackrf.pyhackrf', |
55 | 57 | sources=source_files, |
56 | 58 | libraries=libraries, |
57 | | - include_dirs=['python_hackrf/libhackrf'], |
| 59 | + include_dirs=['python_hackrf/libhackrf', numpy.get_include()], |
58 | 60 | define_macros=[("LIBRARY_VERSION", f'"{LIBRARY_VERSION}"'), ("LIBRARY_RELEASE", f'"{LIBRARY_RELEASE}"')], |
59 | 61 | 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'], |
60 | 68 | ) |
61 | 69 | ], |
62 | 70 | packages=find_packages(), |
|
0 commit comments