|
19 | 19 | import synthtool.gcp as gcp
|
20 | 20 | from synthtool.languages import python
|
21 | 21 |
|
22 |
| -gapic = gcp.GAPICBazel() |
23 | 22 | common = gcp.CommonTemplates()
|
24 | 23 |
|
25 |
| -# ---------------------------------------------------------------------------- |
26 |
| -# Generate OS Config GAPIC layer |
27 |
| -# ---------------------------------------------------------------------------- |
28 |
| -versions = ["v1"] |
| 24 | +default_version = "v1" |
29 | 25 |
|
30 |
| -for version in versions: |
31 |
| - library = gapic.py_library( |
32 |
| - service="osconfig", |
33 |
| - version=version, |
34 |
| - bazel_target=f"//google/cloud/osconfig/{version}:osconfig-{version}-py" |
35 |
| - ) |
| 26 | +for library in s.get_staging_dirs(default_version): |
| 27 | + # rename to google-cloud-os-config |
| 28 | + s.replace([library / "google/**/*.py", library / "tests/**/*.py"], |
| 29 | + "google-cloud-osconfig", |
| 30 | + "google-cloud-os-config") |
36 | 31 |
|
37 |
| - s.move(library, excludes=["nox.py", "setup.py", "README.rst", "docs/index.rst"]) |
| 32 | + # Add newline after last item in list |
| 33 | + s.replace(library / "google/cloud/**/*client.py", |
| 34 | + "(- Must be unique within the project\.)", |
| 35 | + "\g<1>\n") |
38 | 36 |
|
39 |
| -# rename to google-cloud-os-config |
40 |
| -s.replace(["google/**/*.py", "tests/**/*.py"], "google-cloud-osconfig", "google-cloud-os-config") |
41 |
| - |
42 |
| -# Add newline after last item in list |
43 |
| -s.replace("google/cloud/**/*client.py", |
44 |
| -"(- Must be unique within the project\.)", |
45 |
| -"\g<1>\n") |
| 37 | + s.move(library, excludes=["nox.py", "setup.py", "README.rst", "docs/index.rst"]) |
46 | 38 |
|
| 39 | +s.remove_staging_dirs() |
47 | 40 |
|
48 | 41 | # ----------------------------------------------------------------------------
|
49 | 42 | # Add templated files
|
|
0 commit comments