Skip to content

Commit 1eb8274

Browse files
committed
sync
1 parent f9f2bda commit 1eb8274

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

generate_protoc.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88

99
def files_filter(dir, items: List[str]) -> List[str]:
10-
ignored_dirs = ['protos', '.git']
10+
ignored_names = ['.git']
1111

1212
ignore = []
1313
for item in items:
1414
fullpath = os.path.join(dir, item)
15-
if os.path.isdir(fullpath) and item not in ignored_dirs:
15+
if os.path.isdir(fullpath) and item not in ignored_names:
1616
continue
1717
if item.endswith(".proto"):
1818
continue
@@ -32,12 +32,11 @@ def create_init_files(dir):
3232

3333
def replace_protos_dir():
3434
def replace_dir(src, dst):
35-
shutil.rmtree(dst)
35+
shutil.rmtree(dst, ignore_errors=True)
3636
shutil.copytree(src, dst, ignore=files_filter)
3737
create_init_files(dst)
3838

39-
replace_dir("ydb-api-protos", "ydb/public/api/grpc")
40-
replace_dir("ydb-api-protos/protos", "ydb/public/api/protos")
39+
replace_dir("ydb-api-protos", "ydb/_grpc")
4140

4241

4342
def remove_protos():
@@ -49,5 +48,5 @@ def remove_protos():
4948

5049
if __name__ == '__main__':
5150
replace_protos_dir()
52-
command.build_package_protos('./ydb/public/api/')
53-
remove_protos()
51+
command.build_package_protos("ydb/_grpc")
52+
# remove_protos()

0 commit comments

Comments
 (0)