diff options
| author | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-18 22:21:05 -0500 |
|---|---|---|
| committer | Yaakov M. Nemoy <loupgaroublond@gmail.com> | 2009-01-18 22:21:05 -0500 |
| commit | d3d01a3237b1767f61953e34879dffd16667b769 (patch) | |
| tree | 360c9a4d5131580cbbd42973f5a98ef9e2d04a02 /modules/buildsystem.py | |
| parent | 2582dbfd415494a7fa5b378082b0aba19e6d88c1 (diff) | |
| download | fedora-devshell-d3d01a3237b1767f61953e34879dffd16667b769.tar.gz fedora-devshell-d3d01a3237b1767f61953e34879dffd16667b769.tar.xz fedora-devshell-d3d01a3237b1767f61953e34879dffd16667b769.zip | |
Modifies factories, adds a BuildSystemFactory
BSFactory, oh yeah!
Diffstat (limited to 'modules/buildsystem.py')
| -rw-r--r-- | modules/buildsystem.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/buildsystem.py b/modules/buildsystem.py index dbedbfc..5265101 100644 --- a/modules/buildsystem.py +++ b/modules/buildsystem.py @@ -18,7 +18,22 @@ from base.module import Module +class MetaBuildSystem(type): + def __init__(cls, name, bases, attrs): + t = name.lower() + cls._type = t + factories.register_buildsystem(cls, t) + class BuildSystem(Module): + __metaclass__ = MetaBuildSystem + def __init__(self, name): + if type(name) is string: + self.pkg_src = DirFactory(name) + self.name = name + else: + self.pkg_src = name + self.name = name.name + def configure(self, target='home', *args): '''runs the configure stage of cabal |
