Skip to content

Commit ec2d40b

Browse files
committed
uninstalled imports: Fixed gr-audio and gr-atsc.
1 parent bceb96b commit ec2d40b

18 files changed

+76
-21
lines changed

gnuradio-runtime/python/gnuradio/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@
3434
__path__.append(os.path.join(build_path, 'gr-analog', 'python'))
3535
__path__.append(os.path.join(build_path, 'gr-trellis', 'python'))
3636
__path__.append(os.path.join(build_path, 'gr-wavelet', 'python'))
37-
#__path__.append(os.path.join(build_path, 'gr-audio', 'python'))
37+
__path__.append(os.path.join(build_path, 'gr-audio', 'python'))
3838
__path__.append(os.path.join(build_path, 'gr-qtgui', 'python'))
3939
__path__.append(os.path.join(build_path, 'gr-wxgui', 'python'))
40-
#__path__.append(os.path.join(build_path, 'gr-atsc', 'python'))
40+
__path__.append(os.path.join(build_path, 'gr-atsc', 'python'))
4141
__path__.append(os.path.join(build_path, 'gr-noaa', 'python'))
4242
__path__.append(os.path.join(build_path, 'gr-pager', 'python'))
4343
__path__.append(os.path.join(build_path, 'gr-video-sdl', 'python'))

gr-atsc/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ add_subdirectory(lib)
9494
add_subdirectory(include/gnuradio/atsc)
9595
if(ENABLE_PYTHON)
9696
add_subdirectory(swig)
97-
add_subdirectory(python)
97+
add_subdirectory(python/atsc)
9898
endif(ENABLE_PYTHON)
9999

100100
########################################################################

gr-atsc/python/CMakeLists.txt gr-atsc/python/atsc/CMakeLists.txt

+10-11
Original file line numberDiff line numberDiff line change
@@ -51,18 +51,17 @@ install(
5151
########################################################################
5252
if(ENABLE_TESTING)
5353

54-
list(APPEND GR_TEST_PYTHON_DIRS
55-
${CMAKE_BINARY_DIR}/gr-atsc/python
56-
${CMAKE_BINARY_DIR}/gr-atsc/swig
57-
${CMAKE_BINARY_DIR}/gr-blocks/python
58-
${CMAKE_BINARY_DIR}/gr-blocks/swig
59-
)
60-
list(APPEND GR_TEST_TARGET_DEPS gnuradio-atsc gnuradio-fec gnuradio-filter gnuradio-analog gnuradio-fft)
54+
set(GR_TEST_TARGET_DEPS "")
55+
set(GR_TEST_LIBRARY_DIRS "")
56+
set(GR_TEST_PYTHON_DIRS
57+
${CMAKE_BINARY_DIR}/gruel/src/python
58+
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
59+
)
6160

62-
include(GrTest)
63-
file(GLOB py_qa_test_files "qa_*.py")
64-
foreach(py_qa_test_file ${py_qa_test_files})
61+
include(GrTest)
62+
file(GLOB py_qa_test_files "qa_*.py")
63+
foreach(py_qa_test_file ${py_qa_test_files})
6564
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
6665
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
67-
endforeach(py_qa_test_file)
66+
endforeach(py_qa_test_file)
6867
endif(ENABLE_TESTING)
File renamed without changes.

gr-atsc/python/__init__.py gr-atsc/python/atsc/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,11 @@
2424
'''
2525
Blocks and utilities for ATSC (Advanced Television Systems Committee) module.
2626
'''
27+
import os
2728

28-
from atsc_swig import *
29+
try:
30+
from atsc_swig import *
31+
except ImportError:
32+
dirname, filename = os.path.split(os.path.abspath(__file__))
33+
__path__.append(os.path.join(dirname, "..", "..", "swig"))
34+
from atsc_swig import *
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

gr-audio/CMakeLists.txt

+1
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ add_subdirectory(lib)
9191
add_subdirectory(doc)
9292
if(ENABLE_PYTHON)
9393
add_subdirectory(swig)
94+
add_subdirectory(python/audio)
9495
add_subdirectory(grc)
9596
add_subdirectory(examples/python)
9697
add_subdirectory(examples/grc)

gr-audio/python/audio/CMakeLists.txt

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Copyright 2012, 2013 Free Software Foundation, Inc.
2+
#
3+
# This file is part of GNU Radio
4+
#
5+
# GNU Radio is free software; you can redistribute it and/or modify
6+
# it under the terms of the GNU General Public License as published by
7+
# the Free Software Foundation; either version 3, or (at your option)
8+
# any later version.
9+
#
10+
# GNU Radio is distributed in the hope that it will be useful,
11+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
12+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13+
# GNU General Public License for more details.
14+
#
15+
# You should have received a copy of the GNU General Public License
16+
# along with GNU Radio; see the file COPYING. If not, write to
17+
# the Free Software Foundation, Inc., 51 Franklin Street,
18+
# Boston, MA 02110-1301, USA.
19+
20+
########################################################################
21+
include(GrPython)
22+
23+
GR_PYTHON_INSTALL(
24+
FILES
25+
__init__.py
26+
DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
27+
COMPONENT "audio_python"
28+
)
29+
30+
########################################################################
31+
# Handle the unit tests
32+
########################################################################
33+
if(ENABLE_TESTING)
34+
35+
set(GR_TEST_TARGET_DEPS "")
36+
set(GR_TEST_LIBRARY_DIRS "")
37+
set(GR_TEST_PYTHON_DIRS
38+
${CMAKE_BINARY_DIR}/gruel/src/python
39+
${CMAKE_BINARY_DIR}/gnuradio-runtime/python
40+
)
41+
42+
include(GrTest)
43+
file(GLOB py_qa_test_files "qa_*.py")
44+
foreach(py_qa_test_file ${py_qa_test_files})
45+
get_filename_component(py_qa_test_name ${py_qa_test_file} NAME_WE)
46+
GR_ADD_TEST(${py_qa_test_name} ${PYTHON_EXECUTABLE} ${PYTHON_DASH_B} ${py_qa_test_file})
47+
endforeach(py_qa_test_file)
48+
endif(ENABLE_TESTING)

gr-audio/swig/__init__.py gr-audio/python/audio/__init__.py

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,11 @@
2626
The underlying hardware driver is system and OS dependent and this
2727
module should automatically discover the correct one to use.
2828
'''
29+
import os
2930

30-
from audio_swig import *
31+
try:
32+
from audio_swig import *
33+
except ImportError:
34+
dirname, filename = os.path.split(os.path.abspath(__file__))
35+
__path__.append(os.path.join(dirname, "..", "..", "swig"))
36+
from audio_swig import *

gr-audio/swig/CMakeLists.txt

-5
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,3 @@ install(
5555
COMPONENT "audio_swig"
5656
)
5757

58-
GR_PYTHON_INSTALL(
59-
FILES __init__.py
60-
DESTINATION ${GR_PYTHON_DIR}/gnuradio/audio
61-
COMPONENT "audio_python"
62-
)

0 commit comments

Comments
 (0)