Skip to content

Commit b4dbd50

Browse files
committed
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.
1 parent 3f79fc6 commit b4dbd50

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

make_metadata.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
maintainer=%(maintainer)r,
2525
maintainer_email='[email protected]',
2626
license=%(license)r,
27-
%(_what_)s=['%(top_name)s']%(_inst_req_)s)
27+
%(_what_)s=[%(modules)s]%(_inst_req_)s)
2828
"""
2929

3030
DUMMY_DESC = """\
@@ -136,7 +136,10 @@ def main():
136136
data["dist_name"] = dirname
137137
if "name" not in data:
138138
data["name"] = module
139-
data["top_name"] = data["name"].split(".", 1)[0]
139+
140+
data["modules"] = "'" + data["name"].split(".", 1)[0] + "'"
141+
if "extra_modules" in data:
142+
data["modules"] += ", " + ", ".join(["'" + x.strip() + "'" for x in data["extra_modules"].split(",")])
140143

141144
if "depends" in data:
142145
deps = ["micropython-" + x.strip() for x in data["depends"].split(",")]

0 commit comments

Comments
 (0)