Skip to content
This repository has been archived by the owner on Dec 10, 2023. It is now read-only.

Commit

Permalink
chore: Migrate python-dlp synth.py from artman to bazel (#13)
Browse files Browse the repository at this point in the history
Co-authored-by: Bu Sun Kim <8822365+busunkim96@users.noreply.github.com>
  • Loading branch information
vam-google and busunkim96 committed May 1, 2020
1 parent ffad36e commit 41445d1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions synth.py
Expand Up @@ -20,16 +20,16 @@

logging.basicConfig(level=logging.DEBUG)

gapic = gcp.GAPICGenerator()
gapic = gcp.GAPICBazel()
common = gcp.CommonTemplates()

# ----------------------------------------------------------------------------
# Generate dlp GAPIC layer
# ----------------------------------------------------------------------------
library = gapic.py_library(
"dlp",
"v2",
config_path="/google/privacy/dlp/artman_dlp_v2.yaml",
service="dlp",
version="v2",
bazel_target="//google/privacy/dlp/v2:privacy-dlp-v2-py",
include_protos=True,
)

Expand All @@ -39,6 +39,12 @@
# Fix namespace
s.replace("google/**/*.py", "google\.cloud\.privacy\.dlp_v2", "google.cloud.dlp_v2")

s.replace(
"google/cloud/dlp_v2/gapic/dlp_service_client.py",
"google-cloud-privacy-dlp",
"google-cloud-dlp",
)

# Add missing utf-8 marker
s.replace(
"google/cloud/dlp_v2/proto/dlp_pb2.py",
Expand Down

0 comments on commit 41445d1

Please sign in to comment.