diff options
author | alexv-smirnov <[email protected]> | 2023-03-15 19:59:12 +0300 |
---|---|---|
committer | alexv-smirnov <[email protected]> | 2023-03-15 19:59:12 +0300 |
commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/plugins/sandbox_registry.py | |
parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/plugins/sandbox_registry.py')
-rw-r--r-- | build/plugins/sandbox_registry.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/build/plugins/sandbox_registry.py b/build/plugins/sandbox_registry.py new file mode 100644 index 00000000000..dc1be399b32 --- /dev/null +++ b/build/plugins/sandbox_registry.py @@ -0,0 +1,21 @@ +import os + +import ymake + + +def onregister_sandbox_import(unit, *args): + args = iter(args) + for path in args: + path = os.path.normpath(path) + source = unit.resolve_arc_path(path) + abs_source = unit.resolve(source) + if not os.path.exists(abs_source): + ymake.report_configure_error('REGISTER_SANDBOX_IMPORT: File or directory {} does not exists'.format(path)) + splited_path = path.split(os.sep) + l, r = 0, len(splited_path) + if splited_path[-1] == "__init__.py": + r -= 1 + if not splited_path[0]: + l += 1 + path = ".".join(splited_path[l:r]) + unit.onresource(["-", "{}.{}={}".format("SANDBOX_TASK_REGISTRY", path, path)]) |