aboutsummaryrefslogtreecommitdiff
path: root/repos/extra/python-installer/default-bytecode-levels.patch
blob: d588e66f447e4700dccf8b6d61a532fe0aad4725 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
the previous default of 0, 1 causes opt-1 bytecode to also be generated,
which is not used without passing `-O` to `python3` anyway, and doubles
the size of the resulting package

diff --git a/installer/__main__.py b/installer/__main__.py
index 51014b9..2a389e8 100644
--- a/installer/__main__.py
+++ b/installer/__main__.py
@@ -36,7 +36,7 @@ def _get_main_parser() -> argparse.ArgumentParser:
         metavar="level",
         type=int,
         choices=[0, 1, 2],
-        help="generate bytecode for the specified optimization level(s) (default=0, 1)",
+        help="generate bytecode for the specified optimization level(s) (default=0)",
     )
     parser.add_argument(
         "--no-compile-bytecode",
@@ -81,7 +81,7 @@ def _main(cli_args: Sequence[str], program: Optional[str] = None) -> None:
     if args.no_compile_bytecode:
         bytecode_levels = []
     elif not bytecode_levels:
-        bytecode_levels = [0, 1]
+        bytecode_levels = [0]
 
     with WheelFile.open(args.wheel) as source:
         destination = SchemeDictionaryDestination(