Mercurial > treepkg > treepkg
comparison treepkg/readconfig.py @ 4:fee641fec94e
Separate the kolab specific parts.
author | Bernhard Herzog <bh@intevation.de> |
---|---|
date | Fri, 09 Mar 2007 12:26:01 +0100 |
parents | e6a9f4037f68 |
children | 574506a022f6 |
comparison
equal
deleted
inserted
replaced
3:7e9db903ba16 | 4:fee641fec94e |
---|---|
9 | 9 |
10 import sys | 10 import sys |
11 import shlex | 11 import shlex |
12 from ConfigParser import SafeConfigParser, NoOptionError | 12 from ConfigParser import SafeConfigParser, NoOptionError |
13 | 13 |
14 import util | |
15 | |
14 defaults = dict(root_cmd="sudo") | 16 defaults = dict(root_cmd="sudo") |
15 | 17 |
16 packager_desc = [ | 18 packager_desc = [ |
17 "name", "base_dir", "svn_url", | 19 "name", "base_dir", "svn_url", "packager_class", |
18 ("root_cmd", shlex.split), | 20 ("root_cmd", shlex.split), |
19 "deb_email", "deb_fullname", | 21 "deb_email", "deb_fullname", |
20 ] | 22 ] |
21 | 23 |
22 treepkg_desc = [ | 24 treepkg_desc = [ |
57 | 59 |
58 # extract packager configurations | 60 # extract packager configurations |
59 packagers = [] | 61 packagers = [] |
60 for section in parser.sections(): | 62 for section in parser.sections(): |
61 if section.startswith("pkg_"): | 63 if section.startswith("pkg_"): |
62 packagers.append(read_config_section(parser, section, packager_desc, | 64 packager_class = parser.get(section, "packager_class") |
65 module = util.import_dotted_name(packager_class) | |
66 desc = packager_desc + module.AssemblyLine.extra_config_desc | |
67 packagers.append(read_config_section(parser, section, desc, | |
63 dict(name=section[4:]))) | 68 dict(name=section[4:]))) |
64 | 69 |
65 # main config | 70 # main config |
66 treepkg = read_config_section(parser, "treepkg", treepkg_desc) | 71 treepkg = read_config_section(parser, "treepkg", treepkg_desc) |
67 | 72 |