diff options
author | Johnathan Corgan <johnathan@corganlabs.com> | 2013-06-04 13:01:12 -0400 |
---|---|---|
committer | Johnathan Corgan <johnathan@corganlabs.com> | 2013-06-04 13:01:12 -0400 |
commit | 8caec1685af6a53f7b1395983e840b778b1b4c4b (patch) | |
tree | 7ce40a12311d06508bc3722514d5725b96197b90 /gr-fft | |
parent | fc3f03eeba43ed55b45a7508cd519559cbb1ecf4 (diff) | |
parent | 48f3452530b29627ce57089b65363776dbe9a179 (diff) |
Merge remote-tracking branch 'reynwar/uninstalled_imports' into merge-inplace
Diffstat (limited to 'gr-fft')
-rw-r--r-- | gr-fft/CMakeLists.txt | 2 | ||||
-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 |
7 files changed, 23 insertions, 21 deletions
diff --git a/gr-fft/CMakeLists.txt b/gr-fft/CMakeLists.txt index 6bd08b257a..586abe56af 100644 --- a/gr-fft/CMakeLists.txt +++ b/gr-fft/CMakeLists.txt @@ -88,7 +88,7 @@ add_subdirectory(include/gnuradio/fft) add_subdirectory(lib) if(ENABLE_PYTHON) add_subdirectory(swig) - add_subdirectory(python) + add_subdirectory(python/fft) add_subdirectory(grc) endif(ENABLE_PYTHON) #add_subdirectory(examples) diff --git a/gr-fft/python/CMakeLists.txt b/gr-fft/python/fft/CMakeLists.txt index 415d87e2e8..a26b3ea4a8 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-runtime/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 6d75757a05..e0803cbf38 100644 --- a/gr-fft/python/__init__.py +++ b/gr-fft/python/fft/__init__.py @@ -22,6 +22,13 @@ ''' Fourier-transform blocks 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 |