diff options
| author | ?ric Araujo <merwok@netwok.org> | 2011-09-19 04:13:44 +0200 |
|---|---|---|
| committer | ?ric Araujo <merwok@netwok.org> | 2011-09-19 04:13:44 +0200 |
| commit | ac3e06e5805889112ef4589c83c4bfdf748ba327 (patch) | |
| tree | 56716093c5550c7b69cfd92aff7c4b13780292f5 /distutils2/config.py | |
| parent | f62b5109a165942c9fdc07a4ca8e88044d8bb120 (diff) | |
| download | disutils2-ac3e06e5805889112ef4589c83c4bfdf748ba327.tar.gz | |
Minor improvement to extensions section in setup.cfg.
The right-hand part in [extension: foo] is now used as the name of the
extension module. (I changed the separator from = to : and allowed
whitespace to make the sections look nicer.)
Diffstat (limited to 'distutils2/config.py')
| -rw-r--r-- | distutils2/config.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/distutils2/config.py b/distutils2/config.py index 1a85651..f84d1fb 100644 --- a/distutils2/config.py +++ b/distutils2/config.py @@ -257,13 +257,16 @@ class Config(object): ext_modules = self.dist.ext_modules for section_key in content: - labels = section_key.split('=') + # no str.partition in 2.4 :( + labels = section_key.split(':') if len(labels) == 2 and labels[0] == 'extension': - # labels[1] not used from now but should be implemented - # for extension build dependency values_dct = content[section_key] + if 'name' in values_dct: + raise PackagingOptionError( + 'extension name should be given as [extension: name], ' + 'not as key') ext_modules.append(Extension( - values_dct.pop('name'), + labels[1].strip(), _pop_values(values_dct, 'sources'), _pop_values(values_dct, 'include_dirs'), _pop_values(values_dct, 'define_macros'), |
