Skip to content

No way to specify python_gapic_opt flag with py_gapic_library rule #390

@aohren

Description

@aohren

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:

  protoc google/ads/googleads/${VERSION}/**/*.proto \
    --proto_path="${COMMON_PROTOS_PATH}" \
    --proto_path=. \
    --python_gapic_out=${OUTPUT_DIR} \
    --plugin=${GAPIC_GENERATOR_PATH}/gapic/cli/generate.py=python_gapic \
    --python_gapic_opt="old-naming,lazy-import,python-gapic-name=${GAPIC_NAME},python-gapic-templates=${GAPIC_GENERATOR_PATH}/gapic/ads-template"

where one var is custom:

GAPIC_NAME is googleads.

And the other vars are what you'd expect:

COMMON_PROTOS_PATH is api-common-protos dependencies
GAPIC_GENERATOR_PATH is root of gapic-generator-python

Metadata

Metadata

Labels

type: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions