diff options
Diffstat (limited to 'gr-qtgui/python')
-rw-r--r-- | gr-qtgui/python/qtgui/CMakeLists.txt (renamed from gr-qtgui/python/CMakeLists.txt) | 21 | ||||
-rw-r--r-- | gr-qtgui/python/qtgui/__init__.py (renamed from gr-qtgui/python/__init__.py) | 9 | ||||
-rwxr-xr-x | gr-qtgui/python/qtgui/qa_qtgui.py (renamed from gr-qtgui/python/qa_qtgui.py) | 3 |
3 files changed, 19 insertions, 14 deletions
diff --git a/gr-qtgui/python/CMakeLists.txt b/gr-qtgui/python/qtgui/CMakeLists.txt index 5822858082..aa398ca662 100644 --- a/gr-qtgui/python/CMakeLists.txt +++ b/gr-qtgui/python/qtgui/CMakeLists.txt @@ -31,16 +31,17 @@ GR_PYTHON_INSTALL( ######################################################################## if(ENABLE_TESTING) -list(APPEND GR_TEST_PYTHON_DIRS - ${CMAKE_BINARY_DIR}/gr-qtgui/python - ${CMAKE_BINARY_DIR}/gr-qtgui/swig -) -list(APPEND GR_TEST_TARGET_DEPS gnuradio-qtgui) - -include(GrTest) -file(GLOB py_qa_test_files "qa_*.py") -foreach(py_qa_test_file ${py_qa_test_files}) + 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}) 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-qtgui/python/__init__.py b/gr-qtgui/python/qtgui/__init__.py index 25ff1f4dc7..e9aeea7a86 100644 --- a/gr-qtgui/python/__init__.py +++ b/gr-qtgui/python/qtgui/__init__.py @@ -24,6 +24,11 @@ Provides a GUI interface using the QT backend. ''' # The presence of this file turns this directory into a Python package +import os -from qtgui_swig import * -#import qtgui_swig as qtgui # to preserve the old interface +try: + from qtgui_swig import * +except ImportError: + dirname, filename = os.path.split(os.path.abspath(__file__)) + __path__.append(os.path.join(dirname, "..", "..", "swig")) + from qtgui_swig import * diff --git a/gr-qtgui/python/qa_qtgui.py b/gr-qtgui/python/qtgui/qa_qtgui.py index 0761ed3be9..51c0727de4 100755 --- a/gr-qtgui/python/qa_qtgui.py +++ b/gr-qtgui/python/qtgui/qa_qtgui.py @@ -20,8 +20,7 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest -import qtgui_swig as qtgui +from gnuradio import gr, gr_unittest, qtgui class test_qtgui(gr_unittest.TestCase): |