-
Notifications
You must be signed in to change notification settings - Fork 22
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
added 'build' subcmd to __main__.py #158
Conversation
This issue is resolved if python generate_stubs.py fib._lib . which generates
|
Added python -m pydust build --generate-stubs --ext-name 'fib._lib' --ext-path 'fib/fib.zig' |
Added a |
Ah this is quite neat, thank you! Do you think that this could be restructured around the current config object though? By that I mean, leave the arg parsing in main.py, and with the build subcommand, populate a ToolPydust object and pass that into zig_build. So |
Sure. While I personally prefer the class with command line api of the penultimate commit, I appreciate you want to keep the current functional api. The latest commit provides the api as per your request, such that |
pydust/buildzig.py
Outdated
if not conf: | ||
conf = config.load() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if not conf: | |
conf = config.load() | |
conf = conf or config.load() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Thanks for the review.
pydust/__main__.py
Outdated
@@ -12,15 +12,40 @@ | |||
limitations under the License. | |||
""" | |||
|
|||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Our copyright plugin screwed up
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Ah sorry, you got busted by Ruff |
Ok that's fixed 😄 |
@gatesn I'm still getting a CI build failure. Could this be due to the stub_generation issue highlighted earlier? |
Hmm, are you unable to see the output of CI? https://github.com/fulcrum-so/ziggy-pydust/actions/runs/6381967387/job/17319854114?pr=158 Looks like you're missing a |
Head branch was pushed to by a user without write access
Thanks, I'll have a look at fixing this. |
The issue was this That's fixed in the latest commit |
@gatesn Thanks for the merge! |
This change adds a
build
subcmd to__main__.py
and azig_build_config function
inbuildzig.py
for configuring builds from the command line (i.e. without using pyproject.toml).This essentially this enables the following:
Note that although the extension is successfully built and works via direct testing, at the end of the build an error/warning is output: "Not a valid python module, skipping... fib._lib No module named 'fib'"
demo.zip