summaryrefslogtreecommitdiff
path: root/gr-howto-write-a-block
diff options
context:
space:
mode:
authorTom Rondeau2011-02-22 12:25:47 -0500
committerTom Rondeau2011-02-22 15:04:36 -0500
commitc75954de55b6197946a2f166e1dfa8ef902f7b68 (patch)
tree6d97f23795646aefb969fa5b5e52219da6f87477 /gr-howto-write-a-block
parent501aa52bc54937a1042e2b24c5e637e2122f3afe (diff)
downloadgnuradio-c75954de55b6197946a2f166e1dfa8ef902f7b68.tar.gz
gnuradio-c75954de55b6197946a2f166e1dfa8ef902f7b68.tar.bz2
gnuradio-c75954de55b6197946a2f166e1dfa8ef902f7b68.zip
howto: I think this is a better fix than the last one. The modules are now imported from gnuradio.
Diffstat (limited to 'gr-howto-write-a-block')
-rw-r--r--gr-howto-write-a-block/Makefile.common4
-rwxr-xr-xgr-howto-write-a-block/python/qa_howto.py6
-rw-r--r--gr-howto-write-a-block/swig/Makefile.swig.gen2
3 files changed, 6 insertions, 6 deletions
diff --git a/gr-howto-write-a-block/Makefile.common b/gr-howto-write-a-block/Makefile.common
index fca6133c1..ecf3f6d59 100644
--- a/gr-howto-write-a-block/Makefile.common
+++ b/gr-howto-write-a-block/Makefile.common
@@ -71,8 +71,8 @@ guiledir = $(prefix)/share/guile/site
# This usually ends up at:
# ${prefix}/lib/python${python_version}/site-packages/$(modname)
-modpythondir = $(pythondir)/$(modname)
-modpyexecdir = $(pyexecdir)/$(modname)
+modpythondir = $(pythondir)/gnuradio/$(modname)
+modpyexecdir = $(pyexecdir)/gnuradio/$(modname)
# Data directory for grc block wrappers
grc_blocksdir = $(prefix)/share/gnuradio/grc/blocks
diff --git a/gr-howto-write-a-block/python/qa_howto.py b/gr-howto-write-a-block/python/qa_howto.py
index 630f57bf4..96bec2c08 100755
--- a/gr-howto-write-a-block/python/qa_howto.py
+++ b/gr-howto-write-a-block/python/qa_howto.py
@@ -21,7 +21,7 @@
#
from gnuradio import gr, gr_unittest
-import howto_swig
+from gnuradio import howto
class qa_howto (gr_unittest.TestCase):
@@ -35,7 +35,7 @@ class qa_howto (gr_unittest.TestCase):
src_data = (-3, 4, -5.5, 2, 3)
expected_result = (9, 16, 30.25, 4, 9)
src = gr.vector_source_f (src_data)
- sqr = howto_swig.square_ff ()
+ sqr = howto.square_ff ()
dst = gr.vector_sink_f ()
self.tb.connect (src, sqr)
self.tb.connect (sqr, dst)
@@ -47,7 +47,7 @@ class qa_howto (gr_unittest.TestCase):
src_data = (-3, 4, -5.5, 2, 3)
expected_result = (9, 16, 30.25, 4, 9)
src = gr.vector_source_f (src_data)
- sqr = howto_swig.square2_ff ()
+ sqr = howto.square2_ff ()
dst = gr.vector_sink_f ()
self.tb.connect (src, sqr)
self.tb.connect (sqr, dst)
diff --git a/gr-howto-write-a-block/swig/Makefile.swig.gen b/gr-howto-write-a-block/swig/Makefile.swig.gen
index 87ff80a83..1e63fcb0d 100644
--- a/gr-howto-write-a-block/swig/Makefile.swig.gen
+++ b/gr-howto-write-a-block/swig/Makefile.swig.gen
@@ -33,7 +33,7 @@
## this has to be done in the including Makefile.am -before-
## Makefile.swig is included.
-howto_swig_pythondir_category ?= howto
+howto_swig_pythondir_category ?= gnuradio/howto
howto_swig_pylibdir_category ?= $(howto_swig_pythondir_category)
howto_swig_pythondir = $(pythondir)/$(howto_swig_pythondir_category)
howto_swig_pylibdir = $(pyexecdir)/$(howto_swig_pylibdir_category)