diff options
| author | snermolaev <[email protected]> | 2025-05-16 09:31:22 +0300 |
|---|---|---|
| committer | snermolaev <[email protected]> | 2025-05-16 09:46:52 +0300 |
| commit | bd2e3ff66d6b4398194fe32537a0156cfd95310a (patch) | |
| tree | bdc7c94a434fa9e2c2b2b1618a29c1617ad3db74 /build/plugins/java.py | |
| parent | 8228ed61e6958cbef45aa46f65d88992189a650e (diff) | |
get rid of six in plugins
commit_hash:d85f21d6b4179697b8d5f8ab39c7d5216d35d1a8
Diffstat (limited to 'build/plugins/java.py')
| -rw-r--r-- | build/plugins/java.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/build/plugins/java.py b/build/plugins/java.py index c42175634cd..a15aaafeb52 100644 --- a/build/plugins/java.py +++ b/build/plugins/java.py @@ -3,7 +3,6 @@ import ymake import json import os import base64 -import six DELIM = '================================' @@ -115,7 +114,7 @@ def onjava_module(unit, *args): for java_srcs_args in data['JAVA_SRCS']: external = None - for i in six.moves.range(len(java_srcs_args)): + for i in range(len(java_srcs_args)): arg = java_srcs_args[i] if arg == 'EXTERNAL': @@ -135,9 +134,9 @@ def onjava_module(unit, *args): if external: unit.onpeerdir(external) - data = {k: v for k, v in six.iteritems(data) if v} + data = {k: v for k, v in data.items() if v} - dart = 'JAVA_DART: ' + six.ensure_str(base64.b64encode(six.ensure_binary(json.dumps(data)))) + '\n' + DELIM + '\n' + dart = 'JAVA_DART: ' + base64.b64encode(json.dumps(data).encode('utf-8')).decode('utf-8') + '\n' + DELIM + '\n' unit.set_property(['JAVA_DART_DATA', dart]) @@ -278,7 +277,7 @@ def parse_words(words): continue props.append('-B') if len(p) > 1: - props.append(six.ensure_str(base64.b64encode(six.ensure_binary("{}={}".format(p[0], ' '.join(p[1:])))))) + props.append(base64.b64encode("{}={}".format(p[0], ' '.join(p[1:])).encode('utf-8')).decode('utf-8')) else: ymake.report_configure_error('CUSTOM_PROPERTY "{}" value is not specified'.format(p[0])) for i, o in enumerate(outputs): |
