-
Notifications
You must be signed in to change notification settings - Fork 16k
Description
Context: googleapis/artman#97. This currently affects Python only.
What
We'd like the ability to specify the output package name in calls to protoc (actually, we are currently using the gRPC Python wrapper grpc.tools.protoc). Currently the Python package corresponds exactly to the proto directory structure, for example, foo/bar/baz.proto generates the Python module foo.bar.baz_pb2. It should be possible to substitute an arbitrary value for foo.bar. Currently this only seems to be possible by moving the input proto to a different directory; ideally this could just be an argument to protoc.
Why
We do code generation from googleapis/googleapis, which by convention keeps protos in a directory structure the same as the proto package. Sometimes the proto package is not usable as a Python package (for example, it may already be used by google-cloud-python). Ideally we shouldn't need to move the protos in googleapis/googleapis around just for Python code generation.