MCPcopy Create free account
hub / github.com/numpy/numpy / parse_meta

Function parse_meta

numpy/distutils/npy_pkg_config.py:216–230  ·  view source on GitHub ↗
(config)

Source from the content-addressed store, hash-verified

214 self._init_parse_var(name, value)
215
216def parse_meta(config):
217 if not config.has_section('meta'):
218 raise FormatError("No meta section found !")
219
220 d = dict(config.items('meta'))
221
222 for k in ['name', 'description', 'version']:
223 if not k in d:
224 raise FormatError("Option %s (section [meta]) is mandatory, "
225 "but not found" % k)
226
227 if not 'requires' in d:
228 d['requires'] = []
229
230 return d
231
232def parse_variables(config):
233 if not config.has_section('variables'):

Callers 1

parse_configFunction · 0.85

Calls 1

FormatErrorClass · 0.85

Tested by

no test coverage detected