2
0
mirror of https://codeberg.org/kiss-community/repo synced 2024-11-15 03:00:10 -07:00

python-installer: new at 0.7.0

This commit is contained in:
Owen Rafferty 2023-12-27 19:24:35 -06:00
parent 558430a5d0
commit 85a42c3a41
No known key found for this signature in database
6 changed files with 43 additions and 0 deletions

11
extra/python-installer/build Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh -e
sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
unzip -d build installer-$2-py3-none-any.whl
(cd build; patch -p1 < default-bytecode-levels.patch)
mkdir -p "$1/$sitedir"
cp -pR build/installer* "$1/$sitedir"
python -m compileall "$1/$sitedir"

View File

@ -0,0 +1,2 @@
72790531eb73009974eca65759a7088ed1398cd009b85e5a243d1ea22102179bbc
8d93b38e8b441cfac476787bd834230c9dfb59f23ab6a4927ea127e07ad0a2543a

View File

@ -0,0 +1 @@
python

View File

@ -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(

View File

@ -0,0 +1,2 @@
https://files.pythonhosted.org/packages/py3/i/installer/installer-0.7.0-py3-none-any.whl
patches/default-bytecode-levels.patch build

View File

@ -0,0 +1 @@
0.7.0 1