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:
parent
558430a5d0
commit
85a42c3a41
11
extra/python-installer/build
Executable file
11
extra/python-installer/build
Executable 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"
|
2
extra/python-installer/checksums
Normal file
2
extra/python-installer/checksums
Normal file
@ -0,0 +1,2 @@
|
||||
72790531eb73009974eca65759a7088ed1398cd009b85e5a243d1ea22102179bbc
|
||||
8d93b38e8b441cfac476787bd834230c9dfb59f23ab6a4927ea127e07ad0a2543a
|
1
extra/python-installer/depends
Normal file
1
extra/python-installer/depends
Normal file
@ -0,0 +1 @@
|
||||
python
|
26
extra/python-installer/patches/default-bytecode-levels.patch
Normal file
26
extra/python-installer/patches/default-bytecode-levels.patch
Normal 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(
|
2
extra/python-installer/sources
Normal file
2
extra/python-installer/sources
Normal 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
|
1
extra/python-installer/version
Normal file
1
extra/python-installer/version
Normal file
@ -0,0 +1 @@
|
||||
0.7.0 1
|
Loading…
Reference in New Issue
Block a user