summaryrefslogtreecommitdiff
path: root/gr-comedi/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-comedi/python')
-rw-r--r--gr-comedi/python/comedi/CMakeLists.txt (renamed from gr-comedi/python/CMakeLists.txt)20
-rw-r--r--gr-comedi/python/comedi/__init__.py (renamed from gr-comedi/python/__init__.py)8
-rwxr-xr-xgr-comedi/python/comedi/qa_comedi.py (renamed from gr-comedi/python/qa_comedi.py)3
3 files changed, 18 insertions, 13 deletions
diff --git a/gr-comedi/python/CMakeLists.txt b/gr-comedi/python/comedi/CMakeLists.txt
index d8c9fa5d9f..0b62bd910b 100644
--- a/gr-comedi/python/CMakeLists.txt
+++ b/gr-comedi/python/comedi/CMakeLists.txt
@@ -34,17 +34,17 @@ GR_PYTHON_INSTALL(
########################################################################
if(ENABLE_TESTING)
-list(APPEND GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gr-comedi/python
- ${CMAKE_BINARY_DIR}/gr-comedi/swig
-)
-
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-comedi)
+ 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-comedi/python/__init__.py b/gr-comedi/python/comedi/__init__.py
index afe7a161f4..939889dccb 100644
--- a/gr-comedi/python/__init__.py
+++ b/gr-comedi/python/comedi/__init__.py
@@ -23,5 +23,11 @@ Blocks and utilities for COMEDI devices
'''
# The presence of this file turns this directory into a Python package
+import os
-from comedi_swig import *
+try:
+ from comedi_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from comedi_swig import *
diff --git a/gr-comedi/python/qa_comedi.py b/gr-comedi/python/comedi/qa_comedi.py
index 573a2193f7..08ec92dd13 100755
--- a/gr-comedi/python/qa_comedi.py
+++ b/gr-comedi/python/comedi/qa_comedi.py
@@ -20,8 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest
-import comedi_swig as comedi
+from gnuradio import gr, gr_unittest, comedi
class test_comedi(gr_unittest.TestCase):