From c51227a80b5e03e2d18f02f8693de97610fe8f00 Mon Sep 17 00:00:00 2001 From: jblum Date: Sat, 11 Jul 2009 22:10:25 +0000 Subject: [PATCH] make use of gr.version() git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11420 221aa14e-8319-0410-a670-987f0aec2ac5 --- grc/Makefile.am | 13 ++----------- grc/__init__.py | 0 grc/__init__.py.in | 21 --------------------- grc/python/Platform.py | 4 ++-- grc/scripts/grc | 4 ++-- 5 files changed, 6 insertions(+), 36 deletions(-) create mode 100644 grc/__init__.py delete mode 100644 grc/__init__.py.in diff --git a/grc/Makefile.am b/grc/Makefile.am index 4ffdee0b..28408c4a 100644 --- a/grc/Makefile.am +++ b/grc/Makefile.am @@ -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 index 00000000..e69de29b diff --git a/grc/__init__.py.in b/grc/__init__.py.in deleted file mode 100644 index 4c146f95..00000000 --- a/grc/__init__.py.in +++ /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@' diff --git a/grc/python/Platform.py b/grc/python/Platform.py index 8718fe95..f56e3fb2 100644 --- a/grc/python/Platform.py +++ b/grc/python/Platform.py @@ -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', diff --git a/grc/scripts/grc b/grc/scripts/grc index 8a6cc0af..a4115c39 100755 --- a/grc/scripts/grc +++ b/grc/scripts/grc @@ -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 -- 2.30.2