Since the build script of python grpcio-tools package
is very much entangled with the build system of protobuf,
and protobuf build scripts added a build step that
compiles js/embed.cc to create a preprocessor binary
that takes some .js files and generates a single
well_known_types_embed.cc which then gets linked to the
rest of protobuf source tree.
The generated code seems to be used only by the JS
portion of protoc, so is not expected to affect
our python build. Since we did not want to replicate
the entire build process of protobuf, we decided to
pre-generate the well_known_types_embed.cc and keep
it in our repo and then substitute the js/embed.cc
compiler file with it.
Removes MinGW flags from various build scripts, since they're now set in
our `setup.py`s by default. Also removes the arguments for the
extensions in grpcio's setup.py; that function was already accessing
globals anyway, might as well go whole-hog.
Before, namespace packages would break in auditwheel due to a
superfluous check (fixed in the commit referenced in the Dockerfiles).
Now, the auditwheel used in the manylinux1-support Docker images can
handle namespace packages, and we may thus use them. This should
alleviate future user pain w.r.t. installation of grpcio-tools causing
loss of grpcio files and vice versa (e.g. requiring a reinstall of
grpcio following installation of grpcio-tools).
This grossly simplifies the protoc invocation to:
python -m grpc.protoc.compiler --python_out=... --grpc_python_out=...
[...] --plugin=protoc-gen-python-grpc=grpc_python_protoc_plugin... [...]