-
Notifications
You must be signed in to change notification settings - Fork 237
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
L97: Python: Setuptools entrypoint for generating file #290
base: master
Are you sure you want to change the base?
L97: Python: Setuptools entrypoint for generating file #290
Conversation
|
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.
Hi Patrick, sorry for the late review. This proposal will be a huge improvement to UX of using Python Protobuf with gRPC.
L96-python-setuptools-plugin.md
Outdated
the same `main()` function used by the `grpc_tools.protoc` CLI. A [tool table][tool_table] within the | ||
file `pyproject.toml` will be used to accept configuration parameters. This will add a dependency on | ||
tomli for now, but this will [not be needed][pep_680] starting in Python 3.11. | ||
|
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.
Optional: The import path generated by grpc_tools.protoc
can be counterintuitive grpc/grpc#9575. In the config file, we might want to provide the flexibility to: 1. set the work directory; 2. the "prefixes_to_filter" argument.
CC @gnossen , if you got a second, can you help about how to use "prefixes_to_filter" in our generator?
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.
prefixes_to_filter
is currently not available in grpcio-tools
, only in the Bazel rules, so I think it's okay to leave it out of this proposal, at least initially. Regardless, this is the best reference on usage.
b571cc7
to
29baceb
Compare
Number had to be updated because #240 was merged using L96 after this PR was initially created. |
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.
Thanks for the update.
L97-python-setuptools-plugin.md
Outdated
|
||
`grpcio-tools` will register a new entrypoint function to respond to the `setuptools.file_finders` | ||
hook. This hook will generate Python files based on the `.proto` files and tell `setuptools where | ||
they were generated. |
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.
Can we update the example to show how the proto to Python generation should work?
Add some more specifics on how the end user would enable to functionality
14e7d71
to
6ec57ba
Compare
No description provided.