Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix for multiple extension entry bug (+ api change) in 'build' subcmd (…
…#170) In the prior commit there was a bug which prevented multiple extensions from being entered via the `build` subcmd (it would always take the last one entered). The below code ```python build_sp.add_argument("-n", "--ext-name", nargs=True, help="name of extension") build_sp.add_argument("-p", "--ext-path", nargs=True, help="path of extension") ``` really should have been ```python build_sp.add_argument("-n", "--ext-name", nargs='+', help="name of extension") build_sp.add_argument("-p", "--ext-path", nargs='+', help="path of extension") ``` But it was found that this would force the user to enter names and files separately: ```bash python -m pydust build \ --ext-name 'fib._lib' 'fib._hello' \ --ext-path 'fib/fib.zig' 'fib/hello.zig' ``` While this is not terrible, this PR proposes the following new api for entering extensions from the commandline instead: ```python build_sp.add_argument("-e", "--extensions", nargs='+', help="space separated list of extension '<name>=<path>' entries") ``` which would allow the entry of multiple extensions as follows: ```bash python -m pydust build --extensions 'fib._lib=fib/fib.zig' 'fib._hello=fib/hello.zig' # or python -m pydust build -e 'fib._lib=fib/fib.zig' 'fib._hello=fib/hello.zig' ```
- Loading branch information