-
Notifications
You must be signed in to change notification settings - Fork 6
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
Allow builds without a variant but with additional (c)make paramaters such as USER_C_MODULES #46
Comments
One workaround is to provide a blank variant: $ mpbuild build ESP32_GENERIC_S3 "" USER_C_MODULES=/home/jos/micropython_2/ulab/code/micropython.cmake all |
Nice for now, and one for the docs 😎 |
There are two other related thought bubbles:
I'm not 100% happy with the syntax but it does make parsing of the line clearer. What do you think?
$ mpbuild build ESP32_GENERIC_S3 --user-c-modules=/home/jos/micro* Or: $ mpbuild build ESP32_GENERIC_S3 --additional="USER_C_MODULES=/home/jos/micro*" Any opinions? I should probably carve these out into specific discussions... |
To be honest, I don't really like it. There is a lot of documentation that uses just the port board and variants separated by spaces. let me try to see if i can find a way to express that in a typer cli - I think that misses the option for variadic arguments : |
To be honest, I don't really like it. There is a lot of documentation that uses just the port board and variants separated by spaces. Instead, I think it would be rather simple to just assume that there are three arguments provided after the build command. the problem is that Typer cannot handle a limited number or arguments for board & variant , and also handle a a variable number of arguments for the -- / --extra args that need to be passed. Controlling the max length of the PBV list Parsing extra/ additional args to make Ive build a number of different implementations for a quick PoC ,
Stand alone Poc repo : [https://github.com/Josverl/mpbuild_typer_test It accepts
Test resultstest_cli.py Testing: `mpbuild build stm32 PYBV11 DP` Building pbv=['stm32', 'PYBV11', 'DP'] Building port='stm32' board='PYBV11' variant='DP' extra=[] build_container=None idf='v5.2.2' .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: .Testing: And I added a number of tests to verify the input If you think that CLI UX is useful, let me know and I can create a PR against mpbuild. |
currently it is not possible to specify common parameters to make / cmake such as
clean
USER_C_MODULES
as they are incorrectly assumed to be the variant.
jos@josverl-sb5:~/micropython_2$ mpbuild build ESP32_GENERIC_S3 USER_C_MODULES=/home/jos/micropython_2/ulab/code/micropython.cmake all Invalid variant
As a result of that it is not possible to use mpbuild to build a lot of common builds such as adding
ulab
orlvgl
to a build.perhaps
--
can be used to indicate that the remaining params should be passed to (c)make rather than consumed by mpbuildmpbuild build ESP32_GENERIC_S3 -- USER_C_MODULES=/home/jos/micropython_2/ulab/code/micropython.cmake all
The text was updated successfully, but these errors were encountered: