aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/create_init_py.py
diff options
context:
space:
mode:
authoralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
committeralexv-smirnov <alex@ydb.tech>2023-03-15 19:59:12 +0300
commit056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch)
tree4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/plugins/create_init_py.py
parent269126dcced1cc8b53eb4398b4a33e5142f10290 (diff)
downloadydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/plugins/create_init_py.py')
-rw-r--r--build/plugins/create_init_py.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/build/plugins/create_init_py.py b/build/plugins/create_init_py.py
new file mode 100644
index 0000000000..bbe8e8945a
--- /dev/null
+++ b/build/plugins/create_init_py.py
@@ -0,0 +1,15 @@
+import os
+
+from _common import sort_by_keywords
+
+
+def oncreate_init_py_structure(unit, *args):
+ if unit.get('DISTBUILD') or unit.get('AUTOCHECK'):
+ return
+ target_dir = unit.get('PY_PROTOS_FOR_DIR')
+ path_list = target_dir.split(os.path.sep)[1:]
+ inits = [os.path.join("${ARCADIA_BUILD_ROOT}", '__init__.py')]
+ for i in range(1, len(path_list) + 1):
+ inits.append(os.path.join("${ARCADIA_BUILD_ROOT}", os.path.join(*path_list[0:i]), '__init__.py'))
+ unit.ontouch(inits)
+