summaryrefslogtreecommitdiffstats
path: root/src/nbblib/bs.py
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-16 06:12:30 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-16 13:59:02 +0200
commit9559ceb5def8ec5d2e5674e7bf25b484877b3e60 (patch)
treec80b6653c1591e87ed70c5918f5fbbd05e4308f4 /src/nbblib/bs.py
parentc73487455e8d9a283fcb328eab8573c4c5bc73c7 (diff)
downloadnbb-9559ceb5def8ec5d2e5674e7bf25b484877b3e60.tar.gz
nbb-9559ceb5def8ec5d2e5674e7bf25b484877b3e60.tar.xz
nbb-9559ceb5def8ec5d2e5674e7bf25b484877b3e60.zip
Fix some issues found by pylint/pychecker
Includes real issues like wrong argument numbers and missing ancestor __init__() calls, whitespace and comment cleanups. Cannot "fix" everything because of a good amount of the warnings raised by pylint/pychecker are false alarms.
Diffstat (limited to 'src/nbblib/bs.py')
-rw-r--r--src/nbblib/bs.py52
1 files changed, 33 insertions, 19 deletions
diff --git a/src/nbblib/bs.py b/src/nbblib/bs.py
index f9215a2..94f81af 100644
--- a/src/nbblib/bs.py
+++ b/src/nbblib/bs.py
@@ -1,6 +1,6 @@
-########################################################################
-# Buildsystem Source Tree plugins
-########################################################################
+"""\
+Buildsystem Source Tree plugins
+"""
import os
@@ -54,7 +54,8 @@ class BSSourceTree(plugins.GenericDetectPlugin):
return super(BSSourceTree, cls).detect(context, vcs_tree)
- def get_tree_root(self): return self._get_tree_root()
+ def get_tree_root(self):
+ return self._get_tree_root()
tree_root = property(get_tree_root)
@@ -64,15 +65,24 @@ class BSSourceTree(plugins.GenericDetectPlugin):
# Abstract methods
@plugins.abstractmethod
- def _get_tree_root(self): pass
+ def _get_tree_root(self):
+ pass
+
@plugins.abstractmethod
- def init(self): pass
+ def init(self):
+ pass
+
@plugins.abstractmethod
- def configure(self): pass
+ def configure(self):
+ pass
+
@plugins.abstractmethod
- def build(self): pass
+ def build(self):
+ pass
+
@plugins.abstractmethod
- def install(self): pass
+ def install(self):
+ pass
class AutomakeSourceTree(BSSourceTree):
@@ -84,10 +94,10 @@ class AutomakeSourceTree(BSSourceTree):
srcdir = vcs_tree.tree_root
self.config = vcs_tree.config
flag = False
- for f in [ os.path.join(srcdir, 'configure.ac'),
- os.path.join(srcdir, 'configure.in'),
- ]:
- if os.path.exists(f):
+ for fname in [ os.path.join(srcdir, 'configure.ac'),
+ os.path.join(srcdir, 'configure.in'),
+ ]:
+ if os.path.exists(fname):
flag = True
break
if not flag:
@@ -106,7 +116,8 @@ class AutomakeSourceTree(BSSourceTree):
if not os.path.exists(os.path.join(self.config.srcdir, 'configure')):
self.init()
builddir = self.config.builddir
- if not os.path.exists(builddir): os.makedirs(builddir)
+ if not os.path.exists(builddir):
+ os.makedirs(builddir)
os.chdir(builddir)
progutils.prog_run(["%s/configure" % self.config.srcdir,
"--prefix=%s" % self.config.installdir,
@@ -140,9 +151,9 @@ class SconsSourceTree(BSSourceTree):
srcdir = vcs_tree.tree_root
self.config = vcs_tree.config
flag = False
- for f in [ os.path.join(srcdir, 'SConstruct'),
- ]:
- if os.path.exists(f):
+ for fname in [ os.path.join(srcdir, 'SConstruct'),
+ ]:
+ if os.path.exists(fname):
flag = True
break
if not flag:
@@ -152,8 +163,11 @@ class SconsSourceTree(BSSourceTree):
def _get_tree_root(self):
return self.__tree_root
- def init(self): pass
- def configure(self): pass
+ def init(self):
+ pass
+
+ def configure(self):
+ pass
def build(self):
progutils.prog_run(["scons"],