make_metadata.py: Add support for "extra_modules" metadata.txt option.

The usecase is to package upip's standalone dependency modules together with
it. A case of extra packages isn't considered so far.
pull/21/head
Paul Sokolovsky 2015-02-12 15:03:54 +08:00
rodzic 3f79fc64d3
commit b4dbd508d6
1 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -24,7 +24,7 @@ setup(name='micropython-%(dist_name)s',
maintainer=%(maintainer)r,
maintainer_email='micro-python@googlegroups.com',
license=%(license)r,
%(_what_)s=['%(top_name)s']%(_inst_req_)s)
%(_what_)s=[%(modules)s]%(_inst_req_)s)
"""
DUMMY_DESC = """\
@ -136,7 +136,10 @@ def main():
data["dist_name"] = dirname
if "name" not in data:
data["name"] = module
data["top_name"] = data["name"].split(".", 1)[0]
data["modules"] = "'" + data["name"].split(".", 1)[0] + "'"
if "extra_modules" in data:
data["modules"] += ", " + ", ".join(["'" + x.strip() + "'" for x in data["extra_modules"].split(",")])
if "depends" in data:
deps = ["micropython-" + x.strip() for x in data["depends"].split(",")]