Skip to content

Commit

Permalink
tools/manifestfile.py: Add --unix-ffi option.
Browse files Browse the repository at this point in the history
Follow up to 35dd959, allows explicitly
adding the unix-ffi library path from the command line.

This option is needed when building unix-ffi manifests in micropython-lib
CI.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
  • Loading branch information
projectgus authored and dpgeorge committed Feb 19, 2024
1 parent def6ad4 commit 1ef2944
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tools/manifestfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -603,6 +603,9 @@ def main():
default=os.path.join(os.path.dirname(__file__), "../lib/micropython-lib"),
help="path to micropython-lib repo",
)
cmd_parser.add_argument(
"--unix-ffi", action="store_true", help="prepend unix-ffi to the library path"
)
cmd_parser.add_argument("--port", default=None, help="path to port dir")
cmd_parser.add_argument("--board", default=None, help="path to board dir")
cmd_parser.add_argument(
Expand Down Expand Up @@ -632,6 +635,8 @@ def main():
exit(1)

m = ManifestFile(mode, path_vars)
if args.unix_ffi:
m.add_library("unix-ffi", os.path.join("$(MPY_LIB_DIR)", "unix-ffi"), prepend=True)
for manifest_file in args.files:
try:
m.execute(manifest_file)
Expand Down

0 comments on commit 1ef2944

Please sign in to comment.