MCPcopy
hub / github.com/celery/celery / parse_dist_meta

Function parse_dist_meta

setup.py:63–76  ·  view source on GitHub ↗

Extract metadata information from ``$dist/__init__.py``.

()

Source from the content-addressed store, hash-verified

61
62
63def parse_dist_meta():
64 """Extract metadata information from ``$dist/__init__.py``."""
65 pats = {re_meta: _add_default, re_doc: _add_doc}
66 here = os.path.abspath(os.path.dirname(__file__))
67 with open(os.path.join(here, NAME, '__init__.py')) as meta_fh:
68 distmeta = {}
69 for line in meta_fh:
70 if line.strip() == '# -eof meta-':
71 break
72 for pattern, handler in pats.items():
73 m = pattern.match(line.strip())
74 if m:
75 distmeta.update(handler(m))
76 return distmeta
77
78# -*- Requirements -*-
79

Callers 1

setup.pyFile · 0.85

Calls 4

openFunction · 0.85
joinMethod · 0.45
itemsMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected