make_metadata: Support native micropython-lib modules.

pull/118/head
Paul Sokolovsky 2014-05-12 20:24:34 +03:00
rodzic 21cce35120
commit 4f67285ddf
1 zmienionych plików z 19 dodań i 3 usunięć

Wyświetl plik

@ -18,7 +18,7 @@ setup(name='micropython-%(name)s',
maintainer=%(maintainer)r, maintainer=%(maintainer)r,
maintainer_email='micro-python@googlegroups.com', maintainer_email='micro-python@googlegroups.com',
license=%(license)r, license=%(license)r,
%(_what_)s=['%(name)s']) %(_what_)s=['%(top_name)s'])
""" """
DUMMY_DESC = """\ DUMMY_DESC = """\
@ -30,6 +30,13 @@ partially). It is expected that more complete implementation of the module
will be provided later. Please help with the development if you are will be provided later. Please help with the development if you are
interested in this module.""" interested in this module."""
MICROPYTHON_LIB_DESC = """\
This is a module reimplemented specifically for MicroPython standard library,
with efficient and lean design in mind. Note that this module is likely work
in progress and likely supports just a subset of CPython's corresponding
module.Please help with the development if you are interested in this
module."""
MICROPYTHON_DEVELS = 'MicroPython Developers' MICROPYTHON_DEVELS = 'MicroPython Developers'
MICROPYTHON_DEVELS_EMAIL = 'micro-python@googlegroups.com' MICROPYTHON_DEVELS_EMAIL = 'micro-python@googlegroups.com'
CPYTHON_DEVELS = 'CPython Developers' CPYTHON_DEVELS = 'CPython Developers'
@ -74,15 +81,24 @@ def main():
data["maintainer"] = MICROPYTHON_DEVELS data["maintainer"] = MICROPYTHON_DEVELS
data["license"] = "Python" data["license"] = "Python"
data["desc"] = "CPython %s module ported to MicroPython" % module data["desc"] = "CPython %s module ported to MicroPython" % module
elif data["srctype"] == "micropython": elif data["srctype"] == "micropython-lib":
if "author" not in data: if "author" not in data:
data["author"] = MICROPYTHON_DEVELS data["author"] = MICROPYTHON_DEVELS
if "author_email" not in data:
data["author_email"] = MICROPYTHON_DEVELS_EMAIL
if "maintainer" not in data: if "maintainer" not in data:
data["author"] = MICROPYTHON_DEVELS data["maintainer"] = MICROPYTHON_DEVELS
if "desc" not in data:
data["desc"] = "%s module for MicroPython" % module
if "long_desc" not in data:
data["long_desc"] = MICROPYTHON_LIB_DESC
if "license" not in data:
data["license"] = "MIT"
else: else:
raise ValueError raise ValueError
data["name"] = module data["name"] = module
data["top_name"] = module.split(".", 1)[0]
write_setup(module + "/setup.py", data) write_setup(module + "/setup.py", data)