diff options
Diffstat (limited to 'gr-fft/python')
-rw-r--r-- | gr-fft/python/fft/CMakeLists.txt (renamed from gr-fft/python/CMakeLists.txt) | 23 | ||||
-rw-r--r-- | gr-fft/python/fft/__init__.py (renamed from gr-fft/python/__init__.py) | 9 | ||||
-rw-r--r-- | gr-fft/python/fft/logpwrfft.py (renamed from gr-fft/python/logpwrfft.py) | 0 | ||||
-rwxr-xr-x | gr-fft/python/fft/qa_fft.py (renamed from gr-fft/python/qa_fft.py) | 5 | ||||
-rwxr-xr-x | gr-fft/python/fft/qa_goertzel.py (renamed from gr-fft/python/qa_goertzel.py) | 5 | ||||
-rw-r--r-- | gr-fft/python/fft/window.py (renamed from gr-fft/python/window.py) | 0 |
6 files changed, 22 insertions, 20 deletions
diff --git a/gr-fft/python/CMakeLists.txt b/gr-fft/python/fft/CMakeLists.txt index 415d87e2e8..2ffa3ee3c3 100644 --- a/gr-fft/python/CMakeLists.txt +++ b/gr-fft/python/fft/CMakeLists.txt @@ -33,19 +33,16 @@ GR_PYTHON_INSTALL( # Handle the unit tests ######################################################################## if(ENABLE_TESTING) - -list(APPEND GR_TEST_PYTHON_DIRS - ${CMAKE_BINARY_DIR}/gr-fft/python - ${CMAKE_BINARY_DIR}/gr-fft/swig - ${CMAKE_BINARY_DIR}/gr-blocks/python - ${CMAKE_BINARY_DIR}/gr-blocks/swig -) -list(APPEND GR_TEST_TARGET_DEPS gnuradio-fft) - -include(GrTest) -file(GLOB py_qa_test_files "qa_*.py") -foreach(py_qa_test_file ${py_qa_test_files}) + 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}) 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-fft/python/__init__.py b/gr-fft/python/fft/__init__.py index 093cc3c696..acb70a2947 100644 --- a/gr-fft/python/__init__.py +++ b/gr-fft/python/fft/__init__.py @@ -23,6 +23,13 @@ This is the gr-fft package. This package provides GNU Radio processing blocks for FFT and related functions. ''' +import os + +try: + from fft_swig import * +except ImportError: + dirname, filename = os.path.split(os.path.abspath(__file__)) + __path__.append(os.path.join(dirname, "..", "..", "swig")) + from fft_swig import * -from fft_swig import * from window import * diff --git a/gr-fft/python/logpwrfft.py b/gr-fft/python/fft/logpwrfft.py index 98303b1e1e..98303b1e1e 100644 --- a/gr-fft/python/logpwrfft.py +++ b/gr-fft/python/fft/logpwrfft.py diff --git a/gr-fft/python/qa_fft.py b/gr-fft/python/fft/qa_fft.py index c90eea69c5..3c7aa995e4 100755 --- a/gr-fft/python/qa_fft.py +++ b/gr-fft/python/fft/qa_fft.py @@ -19,12 +19,11 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # -from gnuradio import gr, gr_unittest -import fft_swig as fft -import blocks_swig as blocks import sys import random +from gnuradio import gr, gr_unittest, fft, blocks + primes = (2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53, 59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131, 137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223, diff --git a/gr-fft/python/qa_goertzel.py b/gr-fft/python/fft/qa_goertzel.py index 33f1413b6d..c2c5c565e7 100755 --- a/gr-fft/python/qa_goertzel.py +++ b/gr-fft/python/fft/qa_goertzel.py @@ -20,10 +20,9 @@ # Boston, MA 02110-1301, USA. # -from gnuradio import gr, gr_unittest from math import pi, cos -import fft_swig as fft -import blocks_swig as blocks + +from gnuradio import gr, gr_unittest, fft, blocks class test_goertzel(gr_unittest.TestCase): diff --git a/gr-fft/python/window.py b/gr-fft/python/fft/window.py index 0065a08a61..0065a08a61 100644 --- a/gr-fft/python/window.py +++ b/gr-fft/python/fft/window.py |