-
Notifications
You must be signed in to change notification settings - Fork 69
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
No way to specify python_gapic_opt
flag with py_gapic_library
rule
#390
Comments
Output from a https://drive.google.com/a/google.com/file/d/1oKBkNbG6_wjwlNvS8F34CHQFBmLIpM8N/view?usp=sharing |
@aohren there's an updated value for |
@BenRKarl thanks for that. I've edited the original issue in-place to reflect the updated protoc arguments. |
Shoud fix #400 and #390, plus a bunch of other not-yet-opened issues. This includes: 1) Fix long initial load time (5+ min). This was caused by python_rules buildling `grpcio` dependency from sources in one core (which was super slow). Switched to using bazel-native `"@com_github_grpc_grpc//src/python/grpcio/grpc:grpcio"` target instead, which is not only much faster, but is also already used in googleapis, so there is no additional cost for reusing it in microgenerator rules. 2) Properly handle `pandoc` dependency (platform-sepcific version of pandoc is properly pulled by bazel itself using toolchains). 3) Add simplistic version of the `py_gapic_assembly_pkg` rule, to make output of microgenerator compatible with `GAPICBazel` class in synthtool. 4) Add `plugin_args` argument for python_gapic_library rule to pass custom argumetns to the plugin (similar to PHP rules). 5) Add compatibility with `python3.6` runtime (otherwise `python3.7` is minimum because of dependency on `dataclasses` module). Python 3.6 compatibility can be enabled by adding `--define=gapic_gen_python=3.6` command line argument to `bazel build` command. 6) Add support for Python runtimes installed with `pyenv`. To tell bazel using Python3 installed via pyenv add `--extra_toolchains=@gapic_generator_python//:pyenv3_toolchain` argument to `bazel build` command.
This is to suport <plugin_name>_opt command line args for protoc with a <plugin>. See googleapis#390 for more details. This PR depends on googleapis/gapic-generator#3191
This is to suport <plugin_name>_opt command line args for protoc with a <plugin>. See #390 for more details. This PR depends on googleapis/gapic-generator#3191 Example of usage: ```bzl py_gapic_library( name = "documentai_py_gapic", srcs = [":documentai_proto"], opt_args = [ "old-naming", "lazy-import", "python-gapic-name=documentai", "python-gapic-templates=ads-templates", ], ) ```
Should be fixed in #411. Closing. |
Should be fixed by #402 |
We need to replicate the following protoc invocation from Bazel rule
py_gapic_library
. In particular, there's no current way to set--python_gapic_opt
to the desired value below:where one var is custom:
GAPIC_NAME
isgoogleads
.And the other vars are what you'd expect:
COMMON_PROTOS_PATH
is api-common-protos dependenciesGAPIC_GENERATOR_PATH
is root of gapic-generator-pythonThe text was updated successfully, but these errors were encountered: