Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update build subcmd to accept paths (#172)
Only `__main__.py` is modified in this PR. Basically it adds the following features: - extensions can now be specified as `<path>` in addition to `<name>=<path>` - make adding extensions required - can change default prefix of `<path>` built extensions - more validation checks ``` usage: pydust build [-h] [-z ZIG_EXE] [-b BUILD_ZIG] [-m] [-a] [-p PREFIX] extensions [extensions ...] positional arguments: extensions space separated list of extension '<path>' or '<name>=<path>' entries options: -h, --help show this help message and exit -z ZIG_EXE, --zig-exe ZIG_EXE zig executable path (default: None) -b BUILD_ZIG, --build-zig BUILD_ZIG build.zig file (default: build.zig) -m, --self-managed self-managed mode (default: False) -a, --limited-api use limited python c-api (default: True) -p PREFIX, --prefix PREFIX prefix of built extension (default: ) ``` So basically the following is enabled: ```bash python -m pydust build 'fib/hello.zig' 'fib._fib=fib/fib.zig' ``` In the above case, `fib/hello.zig` is mapped to the name `fib.hello` if `--prefix=_` then it is mapped to the name `fib._hello`
- Loading branch information