diff options
author | jcorgan | 2009-07-11 17:52:31 +0000 |
---|---|---|
committer | jcorgan | 2009-07-11 17:52:31 +0000 |
commit | f8369c7a55a9d881674862de2015a51a444320d7 (patch) | |
tree | 40ad9c455212a849c72d9e596beef9e9c0c6cfb2 | |
parent | 3b0db38361d6ff50d62d814e72eb1fdd0e5d762d (diff) | |
download | gnuradio-f8369c7a55a9d881674862de2015a51a444320d7.tar.gz gnuradio-f8369c7a55a9d881674862de2015a51a444320d7.tar.bz2 gnuradio-f8369c7a55a9d881674862de2015a51a444320d7.zip |
Cleanup.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@11419 221aa14e-8319-0410-a670-987f0aec2ac5
-rwxr-xr-x | debian/build-all.sh | 7 | ||||
-rwxr-xr-x | debian/build-bin.sh | 10 | ||||
-rwxr-xr-x | debian/build-src.sh | 9 | ||||
-rwxr-xr-x | debian/make-build-area.sh | 7 | ||||
-rw-r--r-- | debian/prefs.py | 126 | ||||
-rwxr-xr-x | debian/rules | 4 |
6 files changed, 0 insertions, 163 deletions
diff --git a/debian/build-all.sh b/debian/build-all.sh deleted file mode 100755 index dd03b7299..000000000 --- a/debian/build-all.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -cd .. -svn-buildpackage \ - --svn-ignore-new \ - -rfakeroot - diff --git a/debian/build-bin.sh b/debian/build-bin.sh deleted file mode 100755 index 3ed488023..000000000 --- a/debian/build-bin.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -cd .. -svn-buildpackage \ - --svn-ignore-new \ - --svn-dont-clean \ - --svn-dont-purge \ - --svn-reuse \ - -nc \ - -rfakeroot diff --git a/debian/build-src.sh b/debian/build-src.sh deleted file mode 100755 index 1a7c92047..000000000 --- a/debian/build-src.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -cd .. -svn-buildpackage \ - --svn-ignore-new \ - -S \ - -rfakeroot - - diff --git a/debian/make-build-area.sh b/debian/make-build-area.sh deleted file mode 100755 index 20649a341..000000000 --- a/debian/make-build-area.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -cd .. -svn-buildpackage \ - --svn-export \ - --svn-ignore-new - diff --git a/debian/prefs.py b/debian/prefs.py deleted file mode 100644 index 452415b96..000000000 --- a/debian/prefs.py +++ /dev/null @@ -1,126 +0,0 @@ -# -# Copyright 2006,2009 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# GNU Radio 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 3, or (at your option) -# any later version. -# -# GNU Radio 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 GNU Radio; see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, -# Boston, MA 02110-1301, USA. -# - -import gnuradio_swig_python as gsp -_prefs_base = gsp.gr_prefs - - -import ConfigParser -import os -import os.path -import sys - - -def _user_prefs_filename(): - return os.path.expanduser('~/.gnuradio/config.conf') - -def _sys_prefs_dirname(): - return '/etc/gnuradio/conf.d' - -def _bool(x): - """ - Try to coerce obj to a True or False - """ - if isinstance(x, bool): - return x - if isinstance(x, (float, int)): - return bool(x) - raise TypeError, x - - -class _prefs(_prefs_base): - """ - Derive our 'real class' from the stubbed out base class that has support - for SWIG directors. This allows C++ code to magically and transparently - invoke the methods in this python class. - """ - def __init__(self): - _prefs_base.__init__(self) - self.cp = ConfigParser.RawConfigParser() - self.__getattr__ = lambda self, name: getattr(self.cp, name) - - def _sys_prefs_filenames(self): - dir = _sys_prefs_dirname() - try: - fnames = os.listdir(dir) - except (IOError, OSError): - return [] - fnames.sort() - return [os.path.join(dir, f) for f in fnames] - - def _read_files(self): - filenames = self._sys_prefs_filenames() - filenames.append(_user_prefs_filename()) - #print "filenames: ", filenames - self.cp.read(filenames) - - # ---------------------------------------------------------------- - # These methods override the C++ virtual methods of the same name - # ---------------------------------------------------------------- - def has_section(self, section): - return self.cp.has_section(section) - - def has_option(self, section, option): - return self.cp.has_option(section, option) - - def get_string(self, section, option, default_val): - try: - return self.cp.get(section, option) - except: - return default_val - - def get_bool(self, section, option, default_val): - try: - return self.cp.getboolean(section, option) - except: - return default_val - - def get_long(self, section, option, default_val): - try: - return self.cp.getint(section, option) - except: - return default_val - - def get_double(self, section, option, default_val): - try: - return self.cp.getfloat(section, option) - except: - return default_val - # ---------------------------------------------------------------- - # End override of C++ virtual methods - # ---------------------------------------------------------------- - - -_prefs_db = _prefs() - -# if GR_DONT_LOAD_PREFS is set, don't load them. -# (make check uses this to avoid interactions.) -if os.getenv("GR_DONT_LOAD_PREFS", None) is None: - _prefs_db._read_files() - - -_prefs_base.set_singleton(_prefs_db) # tell C++ what instance to use - -def prefs(): - """ - Return the global preference data base - """ - return _prefs_db diff --git a/debian/rules b/debian/rules index edabac6fe..4f77b4a09 100755 --- a/debian/rules +++ b/debian/rules @@ -90,10 +90,6 @@ install-stamp: extract-stamp debian/control install -m 0644 -D debian/grc.conf \ debian/tmp/etc/gnuradio/conf.d/grc.conf - : # Install custom prefs.py FIXME - install -m 0644 -D debian/prefs.py \ - debian/tmp/usr/lib/python2.6/dist-packages/gnuradio/gr/prefs.py - dh_install --sourcedir=debian/tmp touch $@ |