make use of gr.version()
authorjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 11 Jul 2009 22:10:25 +0000 (22:10 +0000)
committerjblum <jblum@221aa14e-8319-0410-a670-987f0aec2ac5>
Sat, 11 Jul 2009 22:10:25 +0000 (22:10 +0000)
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11420 221aa14e-8319-0410-a670-987f0aec2ac5

grc/Makefile.am
grc/__init__.py [new file with mode: 0644]
grc/__init__.py.in [deleted file]
grc/python/Platform.py
grc/scripts/grc

index 4ffdee0b42150eb6d0ac5456a65ef186b2a0a8b5..28408c4a830e3f9d1c6e6aae6af38b73f451741a 100644 (file)
@@ -42,18 +42,9 @@ ourpython_PYTHON = __init__.py
 etcdir = $(gr_prefsdir)
 dist_etc_DATA = grc.conf
 
-EXTRA_DIST = \
-       $(srcdir)/__init__.py.in \
-       $(srcdir)/grc.conf.in
+EXTRA_DIST = $(srcdir)/grc.conf.in
 
-BUILT_SOURCES = \
-       __init__.py \
-       grc.conf
-
-__init__.py: $(srcdir)/__init__.py.in Makefile
-       sed \
-               -e 's|@VERSION[@]|$(VERSION)|g' \
-       $< > $@
+BUILT_SOURCES = grc.conf
 
 grc.conf: $(srcdir)/grc.conf.in Makefile
        sed \
diff --git a/grc/__init__.py b/grc/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/grc/__init__.py.in b/grc/__init__.py.in
deleted file mode 100644 (file)
index 4c146f9..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-"""
-Copyright 2009 Free Software Foundation, Inc.
-This file is part of GNU Radio
-
-GNU Radio Companion 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 2
-of the License, or (at your option) any later version.
-
-GNU Radio Companion 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 this program; if not, write to the Free Software
-Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
-"""
-
-#package and version constants
-VERSION = '@VERSION@'
index 8718fe955a11a074763dcc506e904fdd7e8b62ea..f56e3fb2df169dc0f7b218829f1ce1b88a1b48ce 100644 (file)
@@ -18,7 +18,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
 """
 
 import os
-from .. import VERSION #TEMP: until gnuradio has __version__
+from gnuradio import gr
 from .. base.Platform import Platform as _Platform
 from FlowGraph import FlowGraph as _FlowGraph
 from Connection import Connection as _Connection
@@ -59,7 +59,7 @@ class Platform(_Platform):
                _Platform.__init__(
                        self,
                        name='GNU Radio Companion',
-                       version=VERSION,
+                       version=gr.version(),
                        key='grc',
                        license=__doc__.strip(),
                        website='http://gnuradio.org/trac/wiki/GNURadioCompanion',
index 8a6cc0af4f11e9eb993ba4baa3a3d453c5fef1cb..a4115c39f367d7785d6ecd991d92d74bff0e864a 100755 (executable)
@@ -30,7 +30,7 @@ Cannot import gnuradio. Are your PYTHONPATH and LD_LIBRARY_PATH set correctly?""
        d.run()
        exit(-1)
 
-from gnuradio.grc import VERSION
+from gnuradio import gr
 from optparse import OptionParser
 
 if __name__ == "__main__":
@@ -42,7 +42,7 @@ This program is part of GNU Radio
 GRC comes with ABSOLUTELY NO WARRANTY.
 This is free software,
 and you are welcome to redistribute it.
-"""%VERSION
+"""%gr.version()
        parser = OptionParser(usage=usage, version=version)
        (options, args) = parser.parse_args()
        from gnuradio.grc.python.Platform import Platform