66
77class PythonHackrfRecipe (CythonRecipe ):
88 url = 'https://github.com/GvozdevLeonid/python_hackrf/releases/download/v.{version}/python_hackrf-{version}.tar.gz'
9- depends = ['python3' , 'setuptools' , 'numpy' , 'libusb ' , 'libhackrf' ]
9+ depends = ['python3' , 'setuptools' , 'numpy' , 'pyjnius ' , 'libhackrf' ]
1010 site_packages_name = 'python_hackrf'
1111 name = 'python_hackrf'
1212 version = '1.1.1'
@@ -15,24 +15,12 @@ def get_recipe_env(self, arch):
1515 env = super ().get_recipe_env (arch )
1616
1717 libhackrf_recipe = Recipe .get_recipe ('libhackrf' , arch )
18- libusb_recipe = Recipe .get_recipe ('libusb' , arch )
1918
2019 libhackrf_h_dir = os .path .join (libhackrf_recipe .get_build_dir (arch ), 'host' , 'libhackrf' , 'src' )
21- libusb_h_dir = os .path .join (libusb_recipe .get_build_dir (arch ), 'libusb' )
2220
2321 env ['LDFLAGS' ] += f' -L{ self .ctx .get_libs_dir (arch .arch )} '
24- env ['CFLAGS' ] += f' -I{ libusb_h_dir } -I { libhackrf_h_dir } '
22+ env ['CFLAGS' ] += f' -I{ libhackrf_h_dir } '
2523
2624 return env
2725
28- def prebuild_arch (self , arch ):
29- super ().prebuild_arch (arch )
30-
31- if not os .path .exists (os .path .join (self .get_build_dir (arch .arch ), 'python_hackrf' , 'pylibhackrf' , 'hackrf.c' )):
32- libhackrf_recipe = Recipe .get_recipe ('libhackrf' , arch )
33-
34- shutil .copy (os .path .join (libhackrf_recipe .get_build_dir (arch ), 'host' , 'libhackrf' , 'src' , 'hackrf.h' ), os .path .join (self .get_build_dir (arch .arch ), 'python_hackrf' , 'pylibhackrf' ))
35- shutil .copy (os .path .join (libhackrf_recipe .get_build_dir (arch ), 'host' , 'libhackrf' , 'src' , 'hackrf.c' ), os .path .join (self .get_build_dir (arch .arch ), 'python_hackrf' , 'pylibhackrf' ))
36-
37-
3826recipe = PythonHackrfRecipe ()
0 commit comments