aboutsummaryrefslogtreecommitdiffstats
path: root/build/plugins/ios_assets.py
diff options
context:
space:
mode:
authorheretic <heretic@yandex-team.ru>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /build/plugins/ios_assets.py
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
downloadydb-397cbe258b9e064f49c4ca575279f02f39fef76e.tar.gz
Restoring authorship annotation for <heretic@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'build/plugins/ios_assets.py')
-rw-r--r--build/plugins/ios_assets.py60
1 files changed, 30 insertions, 30 deletions
diff --git a/build/plugins/ios_assets.py b/build/plugins/ios_assets.py
index 5f0ccb9467..77cdcb2177 100644
--- a/build/plugins/ios_assets.py
+++ b/build/plugins/ios_assets.py
@@ -1,30 +1,30 @@
-import _common as common
-import ymake
-import os
-
-
-def onios_assets(unit, *args):
- _, kv = common.sort_by_keywords(
- {'ROOT': 1, 'CONTENTS': -1, 'FLAGS': -1},
- args
- )
- if not kv.get('ROOT', []) and kv.get('CONTENTS', []):
- ymake.report_configure_error('Please specify ROOT directory for assets')
- origin_root = kv.get('ROOT')[0]
- destination_root = os.path.normpath(os.path.join('$BINDIR', os.path.basename(origin_root)))
- rel_list = []
- for cont in kv.get('CONTENTS', []):
- rel = os.path.relpath(cont, origin_root)
- if rel.startswith('..'):
- ymake.report_configure_error('{} is not subpath of {}'.format(cont, origin_root))
- rel_list.append(rel)
- if not rel_list:
- return
- results_list = [os.path.join('$B', unit.path()[3:], os.path.basename(origin_root), i) for i in rel_list]
- if len(kv.get('CONTENTS', [])) != len(results_list):
- ymake.report_configure_error('IOS_ASSETTS content length is not equals results')
- for s, d in zip(kv.get('CONTENTS', []), results_list):
- unit.oncopy_file([s, d])
- if kv.get('FLAGS', []):
- unit.onios_app_assets_flags(kv.get('FLAGS', []))
- unit.on_ios_assets([destination_root] + results_list)
+import _common as common
+import ymake
+import os
+
+
+def onios_assets(unit, *args):
+ _, kv = common.sort_by_keywords(
+ {'ROOT': 1, 'CONTENTS': -1, 'FLAGS': -1},
+ args
+ )
+ if not kv.get('ROOT', []) and kv.get('CONTENTS', []):
+ ymake.report_configure_error('Please specify ROOT directory for assets')
+ origin_root = kv.get('ROOT')[0]
+ destination_root = os.path.normpath(os.path.join('$BINDIR', os.path.basename(origin_root)))
+ rel_list = []
+ for cont in kv.get('CONTENTS', []):
+ rel = os.path.relpath(cont, origin_root)
+ if rel.startswith('..'):
+ ymake.report_configure_error('{} is not subpath of {}'.format(cont, origin_root))
+ rel_list.append(rel)
+ if not rel_list:
+ return
+ results_list = [os.path.join('$B', unit.path()[3:], os.path.basename(origin_root), i) for i in rel_list]
+ if len(kv.get('CONTENTS', [])) != len(results_list):
+ ymake.report_configure_error('IOS_ASSETTS content length is not equals results')
+ for s, d in zip(kv.get('CONTENTS', []), results_list):
+ unit.oncopy_file([s, d])
+ if kv.get('FLAGS', []):
+ unit.onios_app_assets_flags(kv.get('FLAGS', []))
+ unit.on_ios_assets([destination_root] + results_list)