diff options
author | Anthony DiGirolamo <tonymd@google.com> | 2022-04-14 09:24:44 -0700 |
---|---|---|
committer | CQ Bot Account <pigweed-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2022-04-14 17:52:50 +0000 |
commit | 5c0b5b7df6431c37498f44b4d0899274d6e8a9b5 (patch) | |
tree | 2929c1f6c29ad4313657330cd729f9f0b514744d /pw_bloat | |
parent | 0478fd5d8fb7b09eb563e701fe5bbe0de5dee199 (diff) | |
download | pigweed-5c0b5b7df6431c37498f44b4d0899274d6e8a9b5.tar.gz |
pw_protobuf: Install graphlib-backport for Python 3.8
Also remove argparse.BooleanOptionalAction from bloaty config as it is
Python 3.9 only.
Bug: b/229257942
Change-Id: I9240d8e2ca4c44abb241cbf1b49b3722278a3af9
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/91160
Reviewed-by: Scott James Remnant <keybuk@google.com>
Commit-Queue: Anthony DiGirolamo <tonymd@google.com>
Diffstat (limited to 'pw_bloat')
-rw-r--r-- | pw_bloat/py/pw_bloat/bloaty_config.py | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/pw_bloat/py/pw_bloat/bloaty_config.py b/pw_bloat/py/pw_bloat/bloaty_config.py index d5a38dc2a..68e924add 100644 --- a/pw_bloat/py/pw_bloat/bloaty_config.py +++ b/pw_bloat/py/pw_bloat/bloaty_config.py @@ -44,19 +44,33 @@ def _parse_args() -> argparse.Namespace: default=sys.stdout) parser.add_argument( '--utilization', - action=argparse.BooleanOptionalAction, + action='store_true', + dest='utilization', default=True, - help=( - 'Generate the utilization custom_data_source based on sections ' + - 'with "unused_space" in anywhere in their name')) + help=('Generate the utilization custom_data_source based on sections ' + 'with "unused_space" in anywhere in their name'), + ) + parser.add_argument( + '--no-utilization', + action='store_false', + dest='utilization', + ) + parser.add_argument( '--memoryregions', - action=argparse.BooleanOptionalAction, + action='store_true', default=True, - help=('Generate the memoryregions custom_data_source based on ' + - 'symbols defined in the linker script matching the following ' + - 'pattern: ' + - '"pw::bloat::config::memory_region::NAME[0].{start,end}"')) + help=('Generate the memoryregions custom_data_source based on ' + 'symbols defined in the linker script matching the following ' + 'pattern: ' + '"pw::bloat::config::memory_region::NAME[0].{start,end}"'), + ) + parser.add_argument( + '--no-memoryregions', + action='store_false', + dest='memoryregions', + ) + parser.add_argument('-l', '--loglevel', type=pw_cli.argument_types.log_level, |