diff options
author | Ben Reynwar <ben@reynwar.net> | 2013-03-08 20:33:14 -0700 |
---|---|---|
committer | Ben Reynwar <ben@reynwar.net> | 2013-03-08 20:33:14 -0700 |
commit | 5455eb54fea3aadc3ebb7569b5ed8b46837bd47e (patch) | |
tree | 740c55ec91caa7852d7a09da7960eb786e2efba1 /gr-noaa | |
parent | a80c0f4969a994655ccb18c55f8ce936abcc61f7 (diff) |
noaa: Enabling uninstalled python imports.
Diffstat (limited to 'gr-noaa')
-rw-r--r-- | gr-noaa/CMakeLists.txt | 2 | ||||
-rw-r--r-- | gr-noaa/python/noaa/CMakeLists.txt (renamed from gr-noaa/python/CMakeLists.txt) | 0 | ||||
-rw-r--r-- | gr-noaa/python/noaa/__init__.py (renamed from gr-noaa/python/__init__.py) | 9 | ||||
-rwxr-xr-x | gr-noaa/python/noaa/qa_noaa.py (renamed from gr-noaa/python/qa_noaa.py) | 0 |
4 files changed, 9 insertions, 2 deletions
diff --git a/gr-noaa/CMakeLists.txt b/gr-noaa/CMakeLists.txt index 3da763c7f8..707f593a55 100644 --- a/gr-noaa/CMakeLists.txt +++ b/gr-noaa/CMakeLists.txt @@ -89,7 +89,7 @@ add_subdirectory(include/noaa) add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) - add_subdirectory(python) + add_subdirectory(python/noaa) add_subdirectory(grc) add_subdirectory(examples) endif(ENABLE_PYTHON) diff --git a/gr-noaa/python/CMakeLists.txt b/gr-noaa/python/noaa/CMakeLists.txt index 306b8d981b..306b8d981b 100644 --- a/gr-noaa/python/CMakeLists.txt +++ b/gr-noaa/python/noaa/CMakeLists.txt 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..e55debd771 100755 --- a/gr-noaa/python/qa_noaa.py +++ b/gr-noaa/python/noaa/qa_noaa.py |