From 8782b472ffa2911dd351ad51383616358b61bee6 Mon Sep 17 00:00:00 2001 From: 4fury-c3440d8 Date: Mon, 14 Nov 2022 04:11:11 +0300 Subject: [PATCH] python3-installer. --- .../python3/python3-installer/actions.py | 13 +++++ .../files/default-bytecode-levels.patch | 24 ++++++++++ .../python3/python3-installer/pspec.xml | 48 +++++++++++++++++++ 3 files changed, 85 insertions(+) create mode 100644 programming/language/python3/python3-installer/actions.py create mode 100644 programming/language/python3/python3-installer/files/default-bytecode-levels.patch create mode 100644 programming/language/python3/python3-installer/pspec.xml diff --git a/programming/language/python3/python3-installer/actions.py b/programming/language/python3/python3-installer/actions.py new file mode 100644 index 0000000000..b2ccc86d69 --- /dev/null +++ b/programming/language/python3/python3-installer/actions.py @@ -0,0 +1,13 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +# +# Licensed under the GNU General Public License, version 3. +# See the file https://www.gnu.org/licenses/gpl-3.0.txt + +from pisi.actionsapi import pythonmodules + +def build(): + pythonmodules.compile(pyVer = '3') + +def install(): + pythonmodules.install(pyVer = '3') diff --git a/programming/language/python3/python3-installer/files/default-bytecode-levels.patch b/programming/language/python3/python3-installer/files/default-bytecode-levels.patch new file mode 100644 index 0000000000..e5b525da76 --- /dev/null +++ b/programming/language/python3/python3-installer/files/default-bytecode-levels.patch @@ -0,0 +1,24 @@ +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 + +--- a/src/installer/__main__.py ++++ b/src/installer/__main__.py +@@ -29,7 +29,7 @@ + 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", +@@ -68,7 +68,7 @@ + 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( diff --git a/programming/language/python3/python3-installer/pspec.xml b/programming/language/python3/python3-installer/pspec.xml new file mode 100644 index 0000000000..f4c88b0c8e --- /dev/null +++ b/programming/language/python3/python3-installer/pspec.xml @@ -0,0 +1,48 @@ + + + + + python3-installer + https://installer.readthedocs.io/ + + fury + uglyside@yandex.ru + + MIT + library + programming.language.python3 + A low-level library for installing from a Python wheel distribution. + It provides basic functionality and abstractions for handling wheels and installing packages from wheels. + + https://files.pythonhosted.org/packages/source/i/installer/installer-0.5.1.tar.gz + + + python3-devel + python3-setuptools + + + default-bytecode-levels.patch + + + + + python3-installer + + python3 + + + /usr/lib/python3.9 + /usr/share/doc/python3-installer + + + + + + 2022-11-13 + 0.5.1 + First build. + fury + uglyside@yandex.ru + + +