summaryrefslogtreecommitdiff
path: root/gr-utils/modtool/core/rm.py
diff options
context:
space:
mode:
authormormj <34754695+mormj@users.noreply.github.com>2021-11-24 11:48:10 -0500
committerGitHub <noreply@github.com>2021-11-24 11:48:10 -0500
commitd3e49a4e0c72ab81d18bf479d2f6cdccf443b616 (patch)
tree45576799fd50fe01dc894ce89c53682f8ddf680d /gr-utils/modtool/core/rm.py
parent6a4eef30b0ff16006ec31a901937619ff136737a (diff)
modtool: move OOTs equal to components for 3.10
* modtool: move OOTs equal to components for 3.10 Signed-off-by: Josh Morman <jmorman@gnuradio.org> * pybind: update some python dir references Signed-off-by: Josh Morman <jmorman@gnuradio.org> * cmake: have pybind address the correct header Signed-off-by: Josh Morman <jmorman@gnuradio.org> * runtime: extend the python search path allow OOT modules to be installed in other places in PYTHONPATH that have a gnuradio directory Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: update python paths for rm Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: minor fixes for new dir structure Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: update the installed cmake targets Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: add include(CMakePackageConfigHelpers) Signed-off-by: Josh Morman <jmorman@gnuradio.org> * modtool: test_modules dir under gnuradio Signed-off-by: Josh Morman <jmorman@gnuradio.org>
Diffstat (limited to 'gr-utils/modtool/core/rm.py')
-rw-r--r--gr-utils/modtool/core/rm.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/gr-utils/modtool/core/rm.py b/gr-utils/modtool/core/rm.py
index e8f6a74c09..8c9b17612b 100644
--- a/gr-utils/modtool/core/rm.py
+++ b/gr-utils/modtool/core/rm.py
@@ -63,7 +63,7 @@ class ModToolRemove(ModTool):
r'\$\{CMAKE_CURRENT_SOURCE_DIR\}/%s' % filename,
to_ignore_start=f'APPEND test_{modname_}_sources')
self.scm.mark_file_updated(ed.filename)
- elif self.info['version'] == '38':
+ elif self.info['version'] in ['38','310']:
(base, ext) = os.path.splitext(filename)
if ext == '.cc':
ed.remove_value(
@@ -89,15 +89,15 @@ class ModToolRemove(ModTool):
# Go, go, go!
if not self.skip_subdirs['python']:
- py_files_deleted = self._run_subdir('python', ('*.py',), ('GR_PYTHON_INSTALL',),
+ py_files_deleted = self._run_subdir(self.info['pydir'], ('*.py',), ('GR_PYTHON_INSTALL',),
cmakeedit_func=_remove_py_test_case)
for f in py_files_deleted:
remove_pattern_from_file(self._file['pyinit'], fr'.*import\s+{f[:-3]}.*')
remove_pattern_from_file(self._file['pyinit'], fr'.*from\s+{f[:-3]}\s+import.*\n')
- pb_files_deleted = self._run_subdir('python/bindings', ('*.cc',), ('list',))
+ pb_files_deleted = self._run_subdir(os.path.join(self.info['pydir'],'bindings'), ('*.cc',), ('list',))
- pbdoc_files_deleted = self._run_subdir('python/bindings/docstrings', ('*.h',), ('',))
+ pbdoc_files_deleted = self._run_subdir(os.path.join(self.info['pydir'],'bindings','docstrings'), ('*.h',), ('',))
# Update python_bindings.cc
blocknames_to_delete = []
@@ -144,11 +144,11 @@ class ModToolRemove(ModTool):
if self.info['blockname']:
# Ensure the blockname given is not confused with similarly named blocks
blockname_pattern = ''
- if path == 'python':
+ if path == self.info['pydir']:
blockname_pattern = f"^(qa_)?{self.info['blockname']}.py$"
- elif path == 'python/bindings':
+ elif path == os.path.join(self.info['pydir'],'bindings'):
blockname_pattern = f"^{self.info['blockname']}_python.cc$"
- elif path == 'python/bindings/docstrings':
+ elif path == os.path.join(self.info['pydir'],'bindings','docstrings'):
blockname_pattern = f"^{self.info['blockname']}_pydoc_template.h$"
elif path == 'lib':
blockname_pattern = f"^{self.info['blockname']}_impl(\\.h|\\.cc)$"