summaryrefslogtreecommitdiff
path: root/gr-utils/modtool/core/bind.py
diff options
context:
space:
mode:
Diffstat (limited to 'gr-utils/modtool/core/bind.py')
-rw-r--r--gr-utils/modtool/core/bind.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/gr-utils/modtool/core/bind.py b/gr-utils/modtool/core/bind.py
index 2adf4d002d..ac0989bc9f 100644
--- a/gr-utils/modtool/core/bind.py
+++ b/gr-utils/modtool/core/bind.py
@@ -9,7 +9,6 @@
""" Module to call bindtool and create Python bindings """
-
import os
import logging
import warnings
@@ -29,6 +28,7 @@ from gnuradio import gr
logger = logging.getLogger(__name__)
+
class ModToolGenBindings(ModTool):
""" Make YAML file for GRC block bindings """
name = 'bind'
@@ -65,19 +65,22 @@ class ModToolGenBindings(ModTool):
blocknames_to_process.append(self.info['blockname'])
elif self.info['pattern']:
# A regex resembling one or several blocks were given
- blocknames_to_process = get_block_names(self.info['pattern'], self.info['modname'])
+ blocknames_to_process = get_block_names(
+ self.info['pattern'], self.info['modname'])
else:
raise ModToolException("No block name or regex was specified!")
if self.info['version'] in ['310']:
- prefix_include_root = '/'.join(('gnuradio',self.info['modname']))
+ prefix_include_root = '/'.join(('gnuradio',
+ self.info['modname']))
else:
prefix_include_root = self.info['modname']
- files_to_process = [os.path.join(self.dir, self.info['includedir'], f'{blockname}.h') for blockname in blocknames_to_process]
+ files_to_process = [os.path.join(
+ self.dir, self.info['includedir'], f'{blockname}.h') for blockname in blocknames_to_process]
bg = BindingGenerator(prefix=gr.prefix(), namespace=[
- 'gr', self.info['modname']], prefix_include_root=prefix_include_root, output_dir=self.info['pydir'],
- define_symbols=self.info['define_symbols'], addl_includes=self.info['addl_includes'], update_hash_only=self.info['update_hash_only'])
+ 'gr', self.info['modname']], prefix_include_root=prefix_include_root, output_dir=self.info['pydir'],
+ define_symbols=self.info['define_symbols'], addl_includes=self.info['addl_includes'], update_hash_only=self.info['update_hash_only'])
for file_to_process in files_to_process:
if self.info['update_hash_only']:
bg.fix_file_hash(file_to_process)