Skip to content

Commit 0485c02

Browse files
authored
chore: Migrate python-scheduler synth.py from artman to bazel (#13)
1 parent 2680dc6 commit 0485c02

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

packages/google-cloud-scheduler/synth.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
logging.basicConfig(level=logging.DEBUG)
2222

23-
gapic = gcp.GAPICGenerator()
23+
gapic = gcp.GAPICBazel()
2424
common = gcp.CommonTemplates()
2525
versions = ['v1beta1', 'v1']
2626

@@ -29,22 +29,22 @@
2929
# ----------------------------------------------------------------------------
3030

3131
for version in versions:
32-
library = gapic.py_library(
33-
"scheduler",
34-
version,
35-
config_path=f"artman_cloudscheduler_{version}.yaml",
36-
artman_output_name=f"cloudscheduler-{version}",
37-
include_protos=True,
38-
)
39-
40-
excludes = ["README.rst", "nox.py", "setup.py", "docs/conf.py", "docs/index.rst"]
41-
s.move(library, excludes=excludes)
42-
43-
s.replace(
44-
f"google/cloud/scheduler_{version}/gapic/cloud_scheduler_client.py",
45-
"google-cloud-cloudscheduler",
46-
"google-cloud-scheduler",
47-
)
32+
library = gapic.py_library(
33+
service="scheduler",
34+
version=version,
35+
bazel_target=f"//google/cloud/scheduler/{version}:scheduler-{version}-py",
36+
include_protos=True,
37+
)
38+
39+
excludes = ["README.rst", "nox.py", "setup.py", "docs/conf.py",
40+
"docs/index.rst"]
41+
s.move(library, excludes=excludes)
42+
43+
s.replace(
44+
f"google/cloud/scheduler_{version}/gapic/cloud_scheduler_client.py",
45+
"google-cloud-cloudscheduler",
46+
"google-cloud-scheduler",
47+
)
4848

4949
# ----------------------------------------------------------------------------
5050
# Add templated files

0 commit comments

Comments
 (0)