-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Making pb2 auto-gen script also copy over .proto files. #1317
Making pb2 auto-gen script also copy over .proto files. #1317
Conversation
GRPC_PLUGIN=grpc_python_plugin | ||
PROTOC_CMD=protoc |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
It seems a little weird that this is a makefile, given that the logic is all imperative. It seems like there should be a way to use pattern-based dependency rules to do the compilation / copying. |
I agree, I hate it. Should I just take a stab at re-writing this in Python (where I can actually use a for loop)? I must say I don't know much about the
which produces |
bde00aa
to
7a09564
Compare
@tseaver PTAL. This is (hopefully) much easier to read and for now can hold off implementing in Python (and maybe for always). |
7a09564
to
fd2bfe2
Compare
fd2bfe2
to
5be7afc
Compare
Rather than treating the makefile like a bash script, could we make the generated |
Want to take a stab at it? |
Fully revamping the script to be more read-able, split into sections: - Compile `.proto` to `_pb2.py` files - Move over `_pb2.py` files into our library - Clear out old `.proto` files in library - Move over the newly compiled `.proto` files into library and remove the executable bits and prepend them with `_`
5be7afc
to
d97004a
Compare
@tseaver can we punt on the The point of this PR was to prepare for building If you'd like I could also pull the relevant content apart from PRs that use this as a diff base |
@dhermes If |
That will only contain "common" protos (see #1353 for which protos that means). This doesn't help for service specific protos (Bigtable, datastore and soon pub/sub and logging) |
Weird. The googleapis repository actually contains the datastore v1beta3 protos. It doesn't have any of the code for making the Python releases, however. |
@tbetbetbe never told me how they generated the code but the point of |
If we could get the |
Yup. LGTM |
FWIW I've suggested your |
Making pb2 auto-gen script also copy over .proto files.
@tseaver As you'll notice, this is quite nasty. I'm open to suggestions for making this better. Some simple options:
bash
FWIW, this is in advance of
v1beta3
for datastore, which will re-use some of these components (e.g.timestamp
) so we need this pipeline to be a bit more polished.