summaryrefslogtreecommitdiff
path: root/gr-trellis/python
diff options
context:
space:
mode:
Diffstat (limited to 'gr-trellis/python')
-rw-r--r--gr-trellis/python/trellis/CMakeLists.txt (renamed from gr-trellis/python/CMakeLists.txt)27
-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)7
4 files changed, 18 insertions, 24 deletions
diff --git a/gr-trellis/python/CMakeLists.txt b/gr-trellis/python/trellis/CMakeLists.txt
index a166764fbe..b009c2684b 100644
--- a/gr-trellis/python/CMakeLists.txt
+++ b/gr-trellis/python/trellis/CMakeLists.txt
@@ -34,24 +34,17 @@ GR_PYTHON_INSTALL(
########################################################################
if(ENABLE_TESTING)
-list(APPEND GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gr-trellis/python
- ${CMAKE_BINARY_DIR}/gr-trellis/swig
- ${CMAKE_BINARY_DIR}/gr-blocks/python
- ${CMAKE_BINARY_DIR}/gr-blocks/swig
- ${CMAKE_BINARY_DIR}/gr-filter/python
- ${CMAKE_BINARY_DIR}/gr-filter/swig
- ${CMAKE_BINARY_DIR}/gr-analog/python
- ${CMAKE_BINARY_DIR}/gr-analog/swig
- ${CMAKE_BINARY_DIR}/gr-digital/python
- ${CMAKE_BINARY_DIR}/gr-digital/swig
-)
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-trellis gnuradio-digital gnuradio-analog gnuradio-filter)
+ 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-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 b0a2f8a745..86c740a730 100755
--- a/gr-trellis/python/qa_trellis.py
+++ b/gr-trellis/python/trellis/qa_trellis.py
@@ -23,12 +23,7 @@
import math
import os
-from gnuradio import gr, gr_unittest
-
-import trellis_swig as trellis
-import digital_swig as digital
-import analog_swig as analog
-import blocks_swig as blocks
+from gnuradio import gr, gr_unittest, trellis, digital, analog, blocks
fsm_args = {"awgn1o2_4": (2, 4, 4,
(0, 2, 0, 2, 1, 3, 1, 3),