From 1a1c0bb68241619fc01c971d972c3dea330b35c0 Mon Sep 17 00:00:00 2001 From: "Yaakov M. Nemoy" Date: Sun, 18 Jan 2009 22:29:35 -0500 Subject: One Liner bug fixes --- modules/buildsystem.py | 5 ++++- modules/cabal.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'modules') diff --git a/modules/buildsystem.py b/modules/buildsystem.py index 5265101..1e0bd2d 100644 --- a/modules/buildsystem.py +++ b/modules/buildsystem.py @@ -16,6 +16,9 @@ # Authors: Yaakov M. Nemoy # +import base.factories as factories + +from base.factories import DirFactory from base.module import Module class MetaBuildSystem(type): @@ -27,7 +30,7 @@ class MetaBuildSystem(type): class BuildSystem(Module): __metaclass__ = MetaBuildSystem def __init__(self, name): - if type(name) is string: + if type(name) is str: self.pkg_src = DirFactory(name) self.name = name else: diff --git a/modules/cabal.py b/modules/cabal.py index fc9bc4f..696e120 100644 --- a/modules/cabal.py +++ b/modules/cabal.py @@ -134,11 +134,12 @@ class Cabal(BuildSystem): self.install(orig) def gen_spec(self): - cabal_file = self.pkg_src.hackage_name + '.spec' + cabal_file = self.pkg_src.hackage_name + '.cabal' with pwd(self.pkg_src.pkg_src_dir): with log_file('cabal2spec.log') as c2s_log: with pwd(self.pkg_src.dir): cmd = ['cabal2spec', cabal_file] + log.debug(str(cmd)) p = Popen(cmd, stdout=c2s_log, stderr=c2s_log) log.info('Generating spec file for %s' % cabal_file) p.communicate() -- cgit