summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnuradio-runtime/python/gnuradio/__init__.py4
-rw-r--r--gr-atsc/CMakeLists.txt2
-rw-r--r--gr-atsc/python/atsc/CMakeLists.txt (renamed from gr-atsc/python/CMakeLists.txt)21
-rw-r--r--gr-atsc/python/atsc/README (renamed from gr-atsc/python/README)0
-rw-r--r--gr-atsc/python/atsc/__init__.py (renamed from gr-atsc/python/__init__.py)8
-rw-r--r--gr-atsc/python/atsc/all_atsc.py (renamed from gr-atsc/python/all_atsc.py)0
-rw-r--r--gr-atsc/python/atsc/atsc_utils.py (renamed from gr-atsc/python/atsc_utils.py)0
-rwxr-xr-xgr-atsc/python/atsc/btl-fsd.py (renamed from gr-atsc/python/btl-fsd.py)0
-rwxr-xr-xgr-atsc/python/atsc/fpll.py (renamed from gr-atsc/python/fpll.py)0
-rwxr-xr-xgr-atsc/python/atsc/interp.py (renamed from gr-atsc/python/interp.py)0
-rwxr-xr-xgr-atsc/python/atsc/interp_short.py (renamed from gr-atsc/python/interp_short.py)0
-rwxr-xr-xgr-atsc/python/atsc/qa_atsc.py (renamed from gr-atsc/python/qa_atsc.py)0
-rwxr-xr-xgr-atsc/python/atsc/viterbi-out.py (renamed from gr-atsc/python/viterbi-out.py)0
-rwxr-xr-xgr-atsc/python/atsc/xlate.py (renamed from gr-atsc/python/xlate.py)0
-rw-r--r--gr-audio/CMakeLists.txt1
-rw-r--r--gr-audio/python/audio/CMakeLists.txt48
-rw-r--r--gr-audio/python/audio/__init__.py (renamed from gr-audio/swig/__init__.py)8
-rw-r--r--gr-audio/swig/CMakeLists.txt5
18 files changed, 76 insertions, 21 deletions
diff --git a/gnuradio-runtime/python/gnuradio/__init__.py b/gnuradio-runtime/python/gnuradio/__init__.py
index 6494974fcd..433a65ded2 100644
--- a/gnuradio-runtime/python/gnuradio/__init__.py
+++ b/gnuradio-runtime/python/gnuradio/__init__.py
@@ -34,10 +34,10 @@ if path.endswith(path_ending):
__path__.append(os.path.join(build_path, 'gr-analog', 'python'))
__path__.append(os.path.join(build_path, 'gr-trellis', 'python'))
__path__.append(os.path.join(build_path, 'gr-wavelet', 'python'))
- #__path__.append(os.path.join(build_path, 'gr-audio', 'python'))
+ __path__.append(os.path.join(build_path, 'gr-audio', 'python'))
__path__.append(os.path.join(build_path, 'gr-qtgui', 'python'))
__path__.append(os.path.join(build_path, 'gr-wxgui', 'python'))
- #__path__.append(os.path.join(build_path, 'gr-atsc', 'python'))
+ __path__.append(os.path.join(build_path, 'gr-atsc', 'python'))
__path__.append(os.path.join(build_path, 'gr-noaa', 'python'))
__path__.append(os.path.join(build_path, 'gr-pager', 'python'))
__path__.append(os.path.join(build_path, 'gr-video-sdl', 'python'))
diff --git a/gr-atsc/CMakeLists.txt b/gr-atsc/CMakeLists.txt
index 9958edb36c..ffc74a0b4a 100644
--- a/gr-atsc/CMakeLists.txt
+++ b/gr-atsc/CMakeLists.txt
@@ -94,7 +94,7 @@ add_subdirectory(lib)
add_subdirectory(include/gnuradio/atsc)
if(ENABLE_PYTHON)
add_subdirectory(swig)
- add_subdirectory(python)
+ add_subdirectory(python/atsc)
endif(ENABLE_PYTHON)
########################################################################
diff --git a/gr-atsc/python/CMakeLists.txt b/gr-atsc/python/atsc/CMakeLists.txt
index ddc4aba5b5..061f105572 100644
--- a/gr-atsc/python/CMakeLists.txt
+++ b/gr-atsc/python/atsc/CMakeLists.txt
@@ -51,18 +51,17 @@ install(
########################################################################
if(ENABLE_TESTING)
-list(APPEND GR_TEST_PYTHON_DIRS
- ${CMAKE_BINARY_DIR}/gr-atsc/python
- ${CMAKE_BINARY_DIR}/gr-atsc/swig
- ${CMAKE_BINARY_DIR}/gr-blocks/python
- ${CMAKE_BINARY_DIR}/gr-blocks/swig
-)
-list(APPEND GR_TEST_TARGET_DEPS gnuradio-atsc gnuradio-fec gnuradio-filter gnuradio-analog gnuradio-fft)
+ 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})
+ 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-atsc/python/README b/gr-atsc/python/atsc/README
index 74d6ba134c..74d6ba134c 100644
--- a/gr-atsc/python/README
+++ b/gr-atsc/python/atsc/README
diff --git a/gr-atsc/python/__init__.py b/gr-atsc/python/atsc/__init__.py
index e59fec399d..155baa2547 100644
--- a/gr-atsc/python/__init__.py
+++ b/gr-atsc/python/atsc/__init__.py
@@ -24,5 +24,11 @@
'''
Blocks and utilities for ATSC (Advanced Television Systems Committee) module.
'''
+import os
-from atsc_swig import *
+try:
+ from atsc_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from atsc_swig import *
diff --git a/gr-atsc/python/all_atsc.py b/gr-atsc/python/atsc/all_atsc.py
index 7cac785149..7cac785149 100644
--- a/gr-atsc/python/all_atsc.py
+++ b/gr-atsc/python/atsc/all_atsc.py
diff --git a/gr-atsc/python/atsc_utils.py b/gr-atsc/python/atsc/atsc_utils.py
index fc2465bed2..fc2465bed2 100644
--- a/gr-atsc/python/atsc_utils.py
+++ b/gr-atsc/python/atsc/atsc_utils.py
diff --git a/gr-atsc/python/btl-fsd.py b/gr-atsc/python/atsc/btl-fsd.py
index 6bcab3dce3..6bcab3dce3 100755
--- a/gr-atsc/python/btl-fsd.py
+++ b/gr-atsc/python/atsc/btl-fsd.py
diff --git a/gr-atsc/python/fpll.py b/gr-atsc/python/atsc/fpll.py
index dee81da13d..dee81da13d 100755
--- a/gr-atsc/python/fpll.py
+++ b/gr-atsc/python/atsc/fpll.py
diff --git a/gr-atsc/python/interp.py b/gr-atsc/python/atsc/interp.py
index ee2d234892..ee2d234892 100755
--- a/gr-atsc/python/interp.py
+++ b/gr-atsc/python/atsc/interp.py
diff --git a/gr-atsc/python/interp_short.py b/gr-atsc/python/atsc/interp_short.py
index d07b941c12..d07b941c12 100755
--- a/gr-atsc/python/interp_short.py
+++ b/gr-atsc/python/atsc/interp_short.py
diff --git a/gr-atsc/python/qa_atsc.py b/gr-atsc/python/atsc/qa_atsc.py
index dc54051b77..dc54051b77 100755
--- a/gr-atsc/python/qa_atsc.py
+++ b/gr-atsc/python/atsc/qa_atsc.py
diff --git a/gr-atsc/python/viterbi-out.py b/gr-atsc/python/atsc/viterbi-out.py
index cc60ffda42..cc60ffda42 100755
--- a/gr-atsc/python/viterbi-out.py
+++ b/gr-atsc/python/atsc/viterbi-out.py
diff --git a/gr-atsc/python/xlate.py b/gr-atsc/python/atsc/xlate.py
index 3d049ac524..3d049ac524 100755
--- a/gr-atsc/python/xlate.py
+++ b/gr-atsc/python/atsc/xlate.py
diff --git a/gr-audio/CMakeLists.txt b/gr-audio/CMakeLists.txt
index 88cfc40c50..ad39105ec0 100644
--- a/gr-audio/CMakeLists.txt
+++ b/gr-audio/CMakeLists.txt
@@ -91,6 +91,7 @@ add_subdirectory(lib)
add_subdirectory(doc)
if(ENABLE_PYTHON)
add_subdirectory(swig)
+ add_subdirectory(python/audio)
add_subdirectory(grc)
add_subdirectory(examples/python)
add_subdirectory(examples/grc)
diff --git a/gr-audio/python/audio/CMakeLists.txt b/gr-audio/python/audio/CMakeLists.txt
new file mode 100644
index 0000000000..6c44a470e6
--- /dev/null
+++ b/gr-audio/python/audio/CMakeLists.txt
@@ -0,0 +1,48 @@
+# Copyright 2012, 2013 Free Software Foundation, Inc.
+#
+# This file is part of GNU Radio
+#
+# GNU Radio is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GNU Radio is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Radio; see the file COPYING. If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street,
+# Boston, MA 02110-1301, USA.
+
+########################################################################
+include(GrPython)
+
+GR_PYTHON_INSTALL(
+ FILES
+ __init__.py
+ DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
+ COMPONENT "audio_python"
+)
+
+########################################################################
+# Handle the unit tests
+########################################################################
+if(ENABLE_TESTING)
+
+ 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)
+endif(ENABLE_TESTING)
diff --git a/gr-audio/swig/__init__.py b/gr-audio/python/audio/__init__.py
index 7a73e3ca83..8674c26030 100644
--- a/gr-audio/swig/__init__.py
+++ b/gr-audio/python/audio/__init__.py
@@ -26,5 +26,11 @@ ports on a computer.
The underlying hardware driver is system and OS dependent and this
module should automatically discover the correct one to use.
'''
+import os
-from audio_swig import *
+try:
+ from audio_swig import *
+except ImportError:
+ dirname, filename = os.path.split(os.path.abspath(__file__))
+ __path__.append(os.path.join(dirname, "..", "..", "swig"))
+ from audio_swig import *
diff --git a/gr-audio/swig/CMakeLists.txt b/gr-audio/swig/CMakeLists.txt
index 72301d55b1..bc49f4ac8c 100644
--- a/gr-audio/swig/CMakeLists.txt
+++ b/gr-audio/swig/CMakeLists.txt
@@ -55,8 +55,3 @@ install(
COMPONENT "audio_swig"
)
-GR_PYTHON_INSTALL(
- FILES __init__.py
- DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
- COMPONENT "audio_python"
-)