summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Reynwar <ben@reynwar.net>2013-03-08 20:05:52 -0700
committerBen Reynwar <ben@reynwar.net>2013-03-08 20:05:52 -0700
commit86b12479d5179645e0d7b0367dbae2bf531bbca8 (patch)
treed295241405ed320fa7aab86b442848e856a963f1
parentae30f247616b6229fb304e30fecf3f82ae09dbf6 (diff)
trellis: Enabling uninstalled python imports.
-rw-r--r--gnuradio-core/src/python/gnuradio/__init__.py1
-rw-r--r--gr-trellis/CMakeLists.txt2
-rw-r--r--gr-trellis/python/trellis/CMakeLists.txt (renamed from gr-trellis/python/CMakeLists.txt)0
-rw-r--r--gr-trellis/python/trellis/__init__.py (renamed from gr-trellis/python/__init__.py)8
-rw-r--r--gr-trellis/python/trellis/awgn1o2_4.fsm (renamed from gr-trellis/python/awgn1o2_4.fsm)0
-rwxr-xr-xgr-trellis/python/trellis/qa_trellis.py (renamed from gr-trellis/python/qa_trellis.py)0
6 files changed, 9 insertions, 2 deletions
diff --git a/gnuradio-core/src/python/gnuradio/__init__.py b/gnuradio-core/src/python/gnuradio/__init__.py
index 6fe22a7424..03a104ab52 100644
--- a/gnuradio-core/src/python/gnuradio/__init__.py
+++ b/gnuradio-core/src/python/gnuradio/__init__.py
@@ -32,3 +32,4 @@ if path.endswith(path_ending):
__path__.append(os.path.join(build_path, 'gr-filter', 'python'))
__path__.append(os.path.join(build_path, 'gr-fft', 'python'))
__path__.append(os.path.join(build_path, 'gr-analog', 'python'))
+ __path__.append(os.path.join(build_path, 'gr-trellis', 'python'))
diff --git a/gr-trellis/CMakeLists.txt b/gr-trellis/CMakeLists.txt
index b764998e8c..1ac96e5cd7 100644
--- a/gr-trellis/CMakeLists.txt
+++ b/gr-trellis/CMakeLists.txt
@@ -105,7 +105,7 @@ add_subdirectory(lib)
add_subdirectory(doc)
if(ENABLE_PYTHON)
add_subdirectory(swig)
- add_subdirectory(python)
+ add_subdirectory(python/trellis)
add_subdirectory(examples/python)
add_subdirectory(examples/grc)
add_subdirectory(grc)
diff --git a/gr-trellis/python/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index a166764fbe..a166764fbe 100644
--- a/gr-trellis/python/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
diff --git a/gr-trellis/python/__init__.py b/gr-trellis/python/trellis/__init__.py
index a1792bc9b4..f2540e835f 100644
--- a/gr-trellis/python/__init__.py
+++ b/gr-trellis/python/trellis/__init__.py
@@ -23,5 +23,11 @@ Blocks and utilities for trellis coding and related.
'''
# The presence of this file turns this directory into a Python package
+import os
-from trellis_swig import *
+try:
+ from trellis_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from trellis_swig import *
diff --git a/gr-trellis/python/awgn1o2_4.fsm b/gr-trellis/python/trellis/awgn1o2_4.fsm
index 9245c69ac1..9245c69ac1 100644
--- a/gr-trellis/python/awgn1o2_4.fsm
+++ b/gr-trellis/python/trellis/awgn1o2_4.fsm
diff --git a/gr-trellis/python/qa_trellis.py b/gr-trellis/python/trellis/qa_trellis.py
index 983a749af6..983a749af6 100755
--- a/gr-trellis/python/qa_trellis.py
+++ b/gr-trellis/python/trellis/qa_trellis.py