aboutsummaryrefslogtreecommitdiffstats
path: root/main/py3-installer/default-bytecode-levels.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/py3-installer/default-bytecode-levels.patch')
-rw-r--r--main/py3-installer/default-bytecode-levels.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/main/py3-installer/default-bytecode-levels.patch b/main/py3-installer/default-bytecode-levels.patch
new file mode 100644
index 00000000000..d588e66f447
--- /dev/null
+++ b/main/py3-installer/default-bytecode-levels.patch
@@ -0,0 +1,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(