diff options
Diffstat (limited to 'sjhbuild/bundlemodule.py')
-rw-r--r-- | sjhbuild/bundlemodule.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sjhbuild/bundlemodule.py b/sjhbuild/bundlemodule.py index f6071de..c9a950d 100644 --- a/sjhbuild/bundlemodule.py +++ b/sjhbuild/bundlemodule.py @@ -18,8 +18,8 @@ class BundleModule(Package): PHASE_BUILD = 'build' PHASE_INSTALL = 'install' - def __init__(self, name, branch, dependencies=[], after=[]): - Package.__init__(self, name, dependencies, after) + def __init__(self, name, branch, dependencies=None, after=None): + Package.__init__(self, name, dependencies or [], after or []) self.branch = branch def get_srcdir(self, buildscript): @@ -66,7 +66,6 @@ class BundleModule(Package): def do_build(self, buildscript): buildscript.set_action('Building', self) srcdir = self.get_srcdir(buildscript) - builddir = self.get_builddir(buildscript) python = os.environ.get('PYTHON', 'python') cmd = [python, 'setup.py', 'build'] buildscript.execute(cmd, cwd=srcdir) @@ -79,7 +78,6 @@ class BundleModule(Package): def do_install(self, buildscript): buildscript.set_action('Installing', self) srcdir = self.get_srcdir(buildscript) - builddir = self.get_builddir(buildscript) python = os.environ.get('PYTHON', 'python') cmd = [python, 'setup.py', 'install'] cmd.extend(['--prefix', buildscript.config.prefix]) @@ -90,8 +88,8 @@ class BundleModule(Package): def parse_bundle(node, config, uri, repositories, default_repo): - id = node.getAttribute('id') + bundle_id = node.getAttribute('id') branch = get_branch(node, repositories, default_repo, config) - return BundleModule(id, branch) + return BundleModule(bundle_id, branch) register_module_type('bundle', parse_bundle) |