summaryrefslogtreecommitdiff
path: root/gr-video-sdl/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-video-sdl/python')
-rw-r--r--gr-video-sdl/python/video_sdl/CMakeLists.txt (renamed from gr-video-sdl/python/CMakeLists.txt)19
-rw-r--r--gr-video-sdl/python/video_sdl/__init__.py (renamed from gr-video-sdl/python/__init__.py)8
-rwxr-xr-xgr-video-sdl/python/video_sdl/qa_video_sdl.py (renamed from gr-video-sdl/python/qa_video_sdl.py)3
3 files changed, 18 insertions, 12 deletions
diff --git a/gr-video-sdl/python/CMakeLists.txt b/gr-video-sdl/python/video_sdl/CMakeLists.txt
index 5ad70c4c25..ddfe54838d 100644
--- a/gr-video-sdl/python/CMakeLists.txt
+++ b/gr-video-sdl/python/video_sdl/CMakeLists.txt
@@ -34,16 +34,17 @@ GR_PYTHON_INSTALL(
########################################################################
if(ENABLE_TESTING)
-list(APPEND GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gr-video-sdl/python
- ${CMAKE_BINARY_DIR}/gr-video-sdl/swig
-)
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-video-sdl)
+ 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-video-sdl/python/__init__.py b/gr-video-sdl/python/video_sdl/__init__.py
index c029a82c2d..787e84ff08 100644
--- a/gr-video-sdl/python/__init__.py
+++ b/gr-video-sdl/python/video_sdl/__init__.py
@@ -23,5 +23,11 @@ Blocks and utilities for Video SDL module
'''
# The presence of this file turns this directory into a Python package
+import os
-from video_sdl_swig import *
+try:
+ from video_sdl_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from video_sdl_swig import *
diff --git a/gr-video-sdl/python/qa_video_sdl.py b/gr-video-sdl/python/video_sdl/qa_video_sdl.py
index 68c3185ef5..f94957ccc4 100755
--- a/gr-video-sdl/python/qa_video_sdl.py
+++ b/gr-video-sdl/python/video_sdl/qa_video_sdl.py
@@ -20,8 +20,7 @@
# Boston, MA 02110-1301, USA.
#
-from gnuradio import gr, gr_unittest
-import video_sdl_swig as video_sdl
+from gnuradio import gr, gr_unittest, video_sdl
class test_video_sdl (gr_unittest.TestCase):