Skip to content

Commit

Permalink
tools/manifestfile.py: Add author kwarg to metadata().
Browse files Browse the repository at this point in the history
This allows future micropython-lib packages to specify an author.

Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
  • Loading branch information
jimmo authored and dpgeorge committed Sep 29, 2022
1 parent b76ddcb commit 65ab0ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions tools/manifestfile.py
Expand Up @@ -87,14 +87,17 @@ def __init__(self):
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
Expand Down Expand Up @@ -228,7 +231,7 @@ def _search(self, base_path, package_path, files, exts, kind, opt=None, strict=F
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.
Expand All @@ -237,7 +240,7 @@ def metadata(self, description=None, version=None, license=None):
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):
Expand Down

0 comments on commit 65ab0ec

Please sign in to comment.