summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/python
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 /gnuradio-runtime/python
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 'gnuradio-runtime/python')
-rw-r--r--gnuradio-runtime/python/gnuradio/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py
index 8b9e89c177..94e74574fb 100644
--- a/gnuradio-runtime/python/gnuradio/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/__init__.py
@@ -12,6 +12,14 @@ GNU Radio is licensed under the GNU General Public License (GPL) version 3. All
# The docstring will be associated with the top level of the package.
import os
+from pkgutil import extend_path
+
+# Allow OOT modules to be installed elsewhere on the PYTHONPATH
+# For example, gnuradio might be installed to /usr/lib/python3.8/site-packages/gnuradio
+# But an OOT might be installed to /some/other/directory/gnuradio/myoot
+# As long as /some/other/directory/ is in PYTHONPATH, this init file should find it
+# and `from gnuradio import myoot` will work as expected
+__path__ = extend_path(__path__, __name__)
# python3.8 and up need to have the dll search path set
# https://docs.python.org/3/whatsnew/3.8.html#bpo-36085-whatsnew