make use of gr.version()

git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11420 221aa14e-8319-0410-a670-987f0aec2ac5
This commit is contained in:
jblum 2009-07-11 22:10:25 +00:00
parent ca4a0a73a9
commit 04a37ffbaf
5 changed files with 6 additions and 36 deletions

View 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 \

0
__init__.py Normal file
View File

View File

@ -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@'

View 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',

View File

@ -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