8000 tools/makemanifest.py: Add support for optional board-level manifest. by iabdalkader · Pull Request #7624 · micropython/micropython · GitHub
[go: up one dir, main page]

Skip to content

tools/makemanifest.py: Add support for optional board-level manifest. #7624

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

iabdalkader
Copy link
Contributor
  • Allow adding board-level frozen modules via optional manifest in board dir.
  • Example usage:
include("$(BOARD_DIR)/manifest.py", optional=True)

Is there another way to do this already that I've missed ?

* Allow adding board-level frozen modules via optional board-manifest.
* Example usage: include("$(BOARD_DIR)/manifest.py", optional=True)
@dpgeorge
Copy link
Member
dpgeorge commented Aug 7, 2021

Is there another way to do this already that I've missed ?

The idea with making manifest a Python file is that you can do things like this:

import os
if os.path.isfile(...):
    include(...)

@dpgeorge dpgeorge added the tools Relates to tools/ directory in source, or other tooling label Aug 7, 2021
@iabdalkader
Copy link
Contributor Author

But it's not possible to resolve variables like BOARD_DIR in the manifest.py itself, this is done in makemanifest.py, am I right ?

@dpgeorge
Copy link
Member
dpgeorge commented Aug 7, 2021

But it's not possible to resolve variables like BOARD_DIR in the manifest.py itself, this is done in makemanifest.py, am I right ?

Correct. In that case it would make sense to expose convert_path as a public function.

@jimmo
Copy link
Member
jimmo commented Aug 7, 2021

The way this was currently intended to work was that the board-level manifest would be the entry point, and then would include the port-level manifest.

i.e. boards/FOO_BOARD/mpconfigboard.mk would set FROZEN_MANIFEST ?= $(BOARD_DIR)/manifest.py, and then this would include("$(PORT_DIR)/boards/manifest.py"). (esp32/boards/UM_TINYPICO is an example of this, although cmake not make).

Or am I misunderstanding the use case? I can see that it would be nice for a board-level manifest to be automatically found by the port-level one, but in some cases you actually want the board-level one to bypass the port-level one. The example here does exactly that https://github.com/micropython/micropython-example-boards/tree/main/boards/CUSTOM_PYBV11

@iabdalkader
Copy link
Contributor Author
iabdalkader commented Aug 7, 2021

Or am I misunderstanding the use case? I can see that it would be nice for a board-level manifest to be automatically found by the port-level one, but in some cases you actually want the board-level one to bypass the port-level one

Yes that's the use case, and I see your point and agree. I was actually looking at the RP2 port which doesn't allow overriding the manifest variable, so I'll close this PR and I sent this fix instead: #7628

@iabdalkader iabdalkader closed this Aug 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tools Relates to tools/ directory in source, or other tooling
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0