File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change 1515"""This script is used to synthesize generated parts of this library."""
1616
1717import json
18+ from pathlib import Path
1819
1920import synthtool as s
2021from synthtool import gcp
2829default_version = json .load (open (".repo-metadata.json" , "rt" )).get ("default_version" )
2930
3031for library in s .get_staging_dirs (default_version ):
31- s .replace (
32- library / "google/cloud/storage_v2/__init__.py" ,
33- "from google.cloud.storage import gapic_version as package_version" ,
34- "from google.cloud.storage_v2 import gapic_version as package_version" ,
35- )
36-
3732 s .move (
3833 [library ],
3934 excludes = [
5146 "tests/unit/__init__.py" ,
5247 ],
5348 )
49+
50+ source_path = Path ("google/cloud/storage_v2" )
51+ renamed_path = Path ("google/cloud/_storage_v2" )
52+ if source_path .exists ():
53+ source_path .rename (renamed_path )
54+
55+ if renamed_path .exists ():
56+ s .replace (
57+ renamed_path / "__init__.py" ,
58+ "from google.cloud.storage_v2 import gapic_version as package_version" ,
59+ "from google.cloud._storage_v2 import gapic_version as package_version" ,
60+ )
61+
5462s .remove_staging_dirs ()
5563
5664common = gcp .CommonTemplates ()
You can’t perform that action at this time.
0 commit comments