protocolbuffers / protobuf

Protocol Buffers - Google's data interchange format
http://protobuf.dev
Other
65.71k stars 15.51k forks source link

Document how to properly package generated python code #17663

Open maxnoe opened 3 months ago

maxnoe commented 3 months ago

What language does this apply to?

Python

Describe the problem you are trying to solve.

Shipping a python module that includes generated code python code from proto definitions.

The proto definitions are not under the direct control of the authors of the python package.

Describe the solution you'd like

Documentation, and maybe a real fix for #1491 .

Describe alternatives you've considered

Additional context

1491 contains everything but a real solution to the issue.

The documentation for how to use protobuf with python does not mention packaging or shipping python packages that include generated protobuf code.

There are no guidelines how this could be done and naïve approaches lead to the many different proto structure and import related issues in #1491.

I try to summarize the situation:

Actual solutions for this issue on the protoc level were rejected, e.g. in #7470.

github-actions[bot] commented 1 week ago

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago. This issue will be closed and archived after 14 additional days without activity.