summaryrefslogtreecommitdiff
path: root/gr-noaa/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-noaa/python')
-rw-r--r--gr-noaa/python/noaa/CMakeLists.txt (renamed from gr-noaa/python/CMakeLists.txt)20
-rw-r--r--gr-noaa/python/noaa/__init__.py (renamed from gr-noaa/python/__init__.py)9
-rwxr-xr-xgr-noaa/python/noaa/qa_noaa.py (renamed from gr-noaa/python/qa_noaa.py)3
3 files changed, 19 insertions, 13 deletions
diff --git a/gr-noaa/python/CMakeLists.txt b/gr-noaa/python/noaa/CMakeLists.txt
index 306b8d981b..79c7b712cd 100644
--- a/gr-noaa/python/CMakeLists.txt
+++ b/gr-noaa/python/noaa/CMakeLists.txt
@@ -34,17 +34,17 @@ GR_PYTHON_INSTALL(
########################################################################
if(ENABLE_TESTING)
-list(APPEND GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gr-noaa/python
- ${CMAKE_BINARY_DIR}/gr-noaa/swig
-)
-
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-noaa)
+ set(GR_TEST_TARGET_DEPS "")
+ set(GR_TEST_LIBRARY_DIRS "")
+ set(GR_TEST_PYTHON_DIRS
+ ${CMAKE_BINARY_DIR}/gruel/src/python
+ ${CMAKE_BINARY_DIR}/gnuradio-core/src/python
+ )
-include(GrTest)
-file(GLOB py_qa_test_files "qa_*.py")
-foreach(py_qa_test_file ${py_qa_test_files})
+ include(GrTest)
+ file(GLOB py_qa_test_files "qa_*.py")
+ foreach(py_qa_test_file ${py_qa_test_files})
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
-endforeach(py_qa_test_file)
+ endforeach(py_qa_test_file)
endif(ENABLE_TESTING)
diff --git a/gr-noaa/python/__init__.py b/gr-noaa/python/noaa/__init__.py
index 646120c83e..9192d2291e 100644
--- a/gr-noaa/python/__init__.py
+++ b/gr-noaa/python/noaa/__init__.py
@@ -24,4 +24,11 @@ Blocks and utilities for NOAA app.
# The presence of this file turns this directory into a Python package
-from noaa_swig import *
+import os
+
+try:
+ from noaa_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from noaa_swig import *
diff --git a/gr-noaa/python/qa_noaa.py b/gr-noaa/python/noaa/qa_noaa.py
index e55debd771..9b00f6a269 100755
--- a/gr-noaa/python/qa_noaa.py
+++ b/gr-noaa/python/noaa/qa_noaa.py
@@ -20,8 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest
-import noaa_swig as noaa
+from gnuradio import gr, gr_unittest, noaa
class test_noaa(gr_unittest.TestCase):