summaryrefslogtreecommitdiffstatshomepage
path: root/tools/manifestfile.py
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-09-29 23:13:52 +1000
committerDamien George <damien@micropython.org>2022-09-29 23:53:35 +1000
commit65ab0ec91cffe5d39ff2e253ac5cc898ecc3c5ce (patch)
treeb89089a4e70d838d53e5345801b8e7de6a4d84b1 /tools/manifestfile.py
parentb76ddcbc83b7235ab373e764ae033c1e5cecddd1 (diff)
downloadmicropython-65ab0ec91cffe5d39ff2e253ac5cc898ecc3c5ce.tar.gz
micropython-65ab0ec91cffe5d39ff2e253ac5cc898ecc3c5ce.zip
tools/manifestfile.py: Add `author` kwarg to metadata().
This allows future micropython-lib packages to specify an author. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'tools/manifestfile.py')
-rw-r--r--tools/manifestfile.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/tools/manifestfile.py b/tools/manifestfile.py
index a4d056137f..f7966ccb80 100644
--- a/tools/manifestfile.py
+++ b/tools/manifestfile.py
@@ -87,14 +87,17 @@ class ManifestMetadata:
self.version = None
self.description = None
self.license = None
+ self.author = None
- def update(self, description=None, version=None, license=None):
+ def update(self, description=None, version=None, license=None, author=None):
if description:
self.description = description
if version:
self.version = version
if license:
self.license = version
+ if author:
+ self.author = author
# Turns a dict of options into a object with attributes used to turn the
@@ -228,7 +231,7 @@ class ManifestFile:
if base_path:
os.chdir(prev_cwd)
- def metadata(self, description=None, version=None, license=None):
+ def metadata(self, description=None, version=None, license=None, author=None):
"""
From within a manifest file, use this to set the metadata for the
package described by current manifest.
@@ -237,7 +240,7 @@ class ManifestFile:
to obtain the metadata for the top-level manifest file.
"""
- self._metadata[-1].update(description, version, license)
+ self._metadata[-1].update(description, version, license, author)
return self._metadata[-1]
def include(self, manifest_path, top_level=False, **kwargs):