diff options
author | Ben Reynwar <ben@reynwar.net> | 2013-03-08 20:51:57 -0700 |
---|---|---|
committer | Ben Reynwar <ben@reynwar.net> | 2013-03-08 20:51:57 -0700 |
commit | 7757545be4ea4275fe5cd55714dcdfe262aab513 (patch) | |
tree | bcd6b239dfedb73a72fe9f5e4b5039d01109b40d | |
parent | b840ea9a09f1048cac2d7d0ea8fe199294c6242e (diff) |
video_sdl: Enabling uninstalled python imports.
-rw-r--r-- | gnuradio-core/src/python/gnuradio/__init__.py | 1 | ||||
-rw-r--r-- | gr-video-sdl/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-video-sdl/python/video_sdl/CMakeLists.txt (renamed from gr-video-sdl/python/CMakeLists.txt) | 2 | ||||
-rw-r--r-- | gr-video-sdl/python/video_sdl/__init__.py (renamed from gr-video-sdl/python/__init__.py) | 8 | ||||
-rwxr-xr-x | gr-video-sdl/python/video_sdl/qa_video_sdl.py (renamed from gr-video-sdl/python/qa_video_sdl.py) | 0 |
5 files changed, 10 insertions, 3 deletions
diff --git a/gnuradio-core/src/python/gnuradio/__init__.py b/gnuradio-core/src/python/gnuradio/__init__.py index b894a08655..554e9028fa 100644 --- a/gnuradio-core/src/python/gnuradio/__init__.py +++ b/gnuradio-core/src/python/gnuradio/__init__.py @@ -40,3 +40,4 @@ if path.endswith(path_ending): #__path__.append(os.path.join(build_path, 'gr-atsc', 'python')) __path__.append(os.path.join(build_path, 'gr-noaa', 'python')) __path__.append(os.path.join(build_path, 'gr-pager', 'python')) + __path__.append(os.path.join(build_path, 'gr-video-sdl', 'python')) diff --git a/gr-video-sdl/CMakeLists.txt b/gr-video-sdl/CMakeLists.txt index 6dfec7d671..82e0fb2294 100644 --- a/gr-video-sdl/CMakeLists.txt +++ b/gr-video-sdl/CMakeLists.txt @@ -85,7 +85,7 @@ add_subdirectory(include/video_sdl) add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) - add_subdirectory(python) + add_subdirectory(python/video_sdl) endif(ENABLE_PYTHON) ######################################################################## diff --git a/gr-video-sdl/python/CMakeLists.txt b/gr-video-sdl/python/video_sdl/CMakeLists.txt index 0ce0ea3d78..5ad70c4c25 100644 --- a/gr-video-sdl/python/CMakeLists.txt +++ b/gr-video-sdl/python/video_sdl/CMakeLists.txt @@ -25,7 +25,7 @@ include(GrPython) GR_PYTHON_INSTALL( FILES __init__.py - DESTINATION ${GR_PYTHON_DIR}/gnuradio/video-sdl + DESTINATION ${GR_PYTHON_DIR}/gnuradio/video_sdl COMPONENT "video_sdl_python" ) 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..68c3185ef5 100755 --- a/gr-video-sdl/python/qa_video_sdl.py +++ b/gr-video-sdl/python/video_sdl/qa_video_sdl.py |