From 0dc8f5f3c8d64c8ff6cc0ddcd3374d11776977d4 Mon Sep 17 00:00:00 2001 From: Tom Rondeau Date: Mon, 10 Dec 2012 13:28:43 -0500 Subject: core: to make ctest able to import pmts in-tree. This duplicates a recent change made on next for the same reason: 4aec85d2facecb751ab4f83b934e56a6d59037dd --- CMakeLists.txt | 2 ++ gnuradio-core/src/python/gnuradio/gr/hier_block2.py | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc076b9e7..4d0e59e70 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,6 +232,8 @@ install( ######################################################################## list(APPEND GR_TEST_TARGET_DEPS volk gruel gnuradio-core) list(APPEND GR_TEST_PYTHON_DIRS + ${CMAKE_SOURCE_DIR}/gruel/src/python + ${CMAKE_BINARY_DIR}/gruel/src/swig ${CMAKE_BINARY_DIR}/gnuradio-core/src/python ${CMAKE_BINARY_DIR}/gnuradio-core/src/lib/swig ) diff --git a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py index f5f0c00f5..b95782238 100644 --- a/gnuradio-core/src/python/gnuradio/gr/hier_block2.py +++ b/gnuradio-core/src/python/gnuradio/gr/hier_block2.py @@ -20,7 +20,10 @@ # from gnuradio_core import hier_block2_swig -from gruel import pmt +try: + import pmt +except ImportError: + from gruel import pmt # # This hack forces a 'has-a' relationship to look like an 'is-a' one. -- cgit