From b4dbd508d60d028271b9e34c00ab158833555dd6 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 12 Feb 2015 15:03:54 +0800 Subject: [PATCH] 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. --- make_metadata.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/make_metadata.py b/make_metadata.py index ea6b7dab..c75fbd3c 100755 --- a/make_metadata.py +++ b/make_metadata.py @@ -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(",")]