summaryrefslogtreecommitdiffstats
path: root/modules/cabal.py
diff options
context:
space:
mode:
authorYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-18 21:12:09 -0500
committerYaakov M. Nemoy <loupgaroublond@gmail.com>2009-01-18 21:12:09 -0500
commit104b3c4262fa3cb6b24ed0e1cd5402b14f4eab8f (patch)
tree9606a60155e93229b50a9011bf5d0dae7e848c9a /modules/cabal.py
parent8bbbcbd2cdad36e27c127c888897395cefcff3d0 (diff)
downloadfedora-devshell-104b3c4262fa3cb6b24ed0e1cd5402b14f4eab8f.tar.gz
fedora-devshell-104b3c4262fa3cb6b24ed0e1cd5402b14f4eab8f.tar.xz
fedora-devshell-104b3c4262fa3cb6b24ed0e1cd5402b14f4eab8f.zip
Fixes up HaskellPort to work with the new refactoring.
Also adds some close code for ports Also mistakenly stuck some code in HaskellPort that really belongs to the build system
Diffstat (limited to 'modules/cabal.py')
-rw-r--r--modules/cabal.py16
1 files changed, 14 insertions, 2 deletions
diff --git a/modules/cabal.py b/modules/cabal.py
index 4b118d6..4ddea87 100644
--- a/modules/cabal.py
+++ b/modules/cabal.py
@@ -47,8 +47,12 @@ class Cabal(BuildSystem):
name is a Package (Directory) that uses cabal for its build system
'''
- self.name = name
- self.pkg_src = DirFactory(name)
+ if type(name) is string:
+ self.pkg_src = DirFactory(name)
+ self.name = name
+ else:
+ self.pkg_src = name
+ self.name = name.name
self.compiler = haskell_compiler
def find_setup(self):
@@ -126,6 +130,14 @@ class Cabal(BuildSystem):
log.info('Building %s, please wait...' % self.name)
p.wait()
+ def install_source(self, target='home', *args):
+ '''perform configure, build, and install steps in one
+ '''
+ with self.pkg_src.src(*args):
+ self.configure(target, orig)
+ self.build(orig)
+ self.install(orig)
+
def close(self):
self.pkg_src.close()