diff options
author | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
---|---|---|
committer | alexv-smirnov <alex@ydb.tech> | 2023-03-15 19:59:12 +0300 |
commit | 056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11 (patch) | |
tree | 4740980126f32e3af7937ba0ca5f83e59baa4ab0 /build/plugins/bundle.py | |
parent | 269126dcced1cc8b53eb4398b4a33e5142f10290 (diff) | |
download | ydb-056bb284ccf8dd6793ec3a54ffa36c4fb2b9ad11.tar.gz |
add library/cpp/actors, ymake build to ydb oss export
Diffstat (limited to 'build/plugins/bundle.py')
-rw-r--r-- | build/plugins/bundle.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/build/plugins/bundle.py b/build/plugins/bundle.py new file mode 100644 index 0000000000..0bec8254ee --- /dev/null +++ b/build/plugins/bundle.py @@ -0,0 +1,22 @@ +import os + + +def onbundle(unit, *args): + """ + @usage BUNDLE(<Dir [NAME Name]>...) + + Brings build artefact from module Dir under optional Name to the current module (e.g. UNION) + If NAME is not specified, the name of the Dir's build artefact will be preserved + It makes little sense to specify BUNDLE on non-final targets and so this may stop working without prior notice. + Bundle on multimodule will select final target among multimodule variants and will fail if there are none or more than one. + """ + i = 0 + while i < len(args): + if i + 2 < len(args) and args[i + 1] == "NAME": + target, name = args[i], args[i + 2] + i += 3 + else: + target, name = args[i], os.path.basename(args[i]) + i += 1 + + unit.on_bundle_target([target, name]) |