From 558430a5d0389442286db713c16dfa92b8e5a89a Mon Sep 17 00:00:00 2001 From: Owen Rafferty Date: Wed, 27 Dec 2023 19:22:14 -0600 Subject: [PATCH] python-gpep517: new at 15 --- extra/python-gpep517/build | 13 +++++++++++++ extra/python-gpep517/checksums | 3 +++ extra/python-gpep517/depends | 1 + extra/python-gpep517/files/gpep517.bin | 6 ++++++ .../patches/default-bytecode-levels.patch | 16 ++++++++++++++++ extra/python-gpep517/sources | 3 +++ extra/python-gpep517/version | 1 + 7 files changed, 43 insertions(+) create mode 100755 extra/python-gpep517/build create mode 100644 extra/python-gpep517/checksums create mode 100644 extra/python-gpep517/depends create mode 100755 extra/python-gpep517/files/gpep517.bin create mode 100644 extra/python-gpep517/patches/default-bytecode-levels.patch create mode 100644 extra/python-gpep517/sources create mode 100644 extra/python-gpep517/version diff --git a/extra/python-gpep517/build b/extra/python-gpep517/build new file mode 100755 index 00000000..332bea20 --- /dev/null +++ b/extra/python-gpep517/build @@ -0,0 +1,13 @@ +#!/bin/sh -e + +patch -p1 < default-bytecode-levels.patch + +sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')" + +mkdir -p "$1/$sitedir" +cp -pR gpep517 "$1/$sitedir" +python -m compileall "$1/$sitedir" + +mkdir -p "$1/usr/bin" +cp gpep517.bin "$1/usr/bin/gpep517" +chmod 755 "$1/usr/bin/gpep517" diff --git a/extra/python-gpep517/checksums b/extra/python-gpep517/checksums new file mode 100644 index 00000000..dc13e862 --- /dev/null +++ b/extra/python-gpep517/checksums @@ -0,0 +1,3 @@ +1b667c868cac2666242d3f655619286e2da926667f407ef992fba29caa80d80fe9 +482b3562a2d6a9b273e8e2049bc29136643cad5002495cff0e1169c53ea8b6eb2b +236459f14ba3e57226f6c21df619d2ad6198b9d68a5af131c05f98faff05a167d2 diff --git a/extra/python-gpep517/depends b/extra/python-gpep517/depends new file mode 100644 index 00000000..fdc793e7 --- /dev/null +++ b/extra/python-gpep517/depends @@ -0,0 +1 @@ +python diff --git a/extra/python-gpep517/files/gpep517.bin b/extra/python-gpep517/files/gpep517.bin new file mode 100755 index 00000000..e605e49e --- /dev/null +++ b/extra/python-gpep517/files/gpep517.bin @@ -0,0 +1,6 @@ +#!/usr/bin/python +# -*- coding: utf-8 -*- +import sys +from gpep517.__main__ import main +if __name__ == "__main__": + sys.exit(main()) diff --git a/extra/python-gpep517/patches/default-bytecode-levels.patch b/extra/python-gpep517/patches/default-bytecode-levels.patch new file mode 100644 index 00000000..55aa77ab --- /dev/null +++ b/extra/python-gpep517/patches/default-bytecode-levels.patch @@ -0,0 +1,16 @@ +diff --git a/gpep517/__main__.py b/gpep517/__main__.py +index d519c75..2dc0b49 100644 +--- a/gpep517/__main__.py ++++ b/gpep517/__main__.py +@@ -350,9 +350,9 @@ def add_install_args(parser): + f"(default: {sys.executable})") + group.add_argument("--optimize", + type=parse_optimize_arg, +- default=[], ++ default=[0], + help="Comma-separated list of optimization levels " +- "to compile bytecode for (default: none), pass 'all' " ++ "to compile bytecode for (default: 0), 0s 'all' " + "to enable all known optimization levels (currently: " + f"{', '.join(str(x) for x in ALL_OPT_LEVELS)})") + diff --git a/extra/python-gpep517/sources b/extra/python-gpep517/sources new file mode 100644 index 00000000..ed468b94 --- /dev/null +++ b/extra/python-gpep517/sources @@ -0,0 +1,3 @@ +https://github.com/mgorny/gpep517/archive/v15/gpep517-v15.tar.gz +files/gpep517.bin +patches/default-bytecode-levels.patch diff --git a/extra/python-gpep517/version b/extra/python-gpep517/version new file mode 100644 index 00000000..a222f032 --- /dev/null +++ b/extra/python-gpep517/version @@ -0,0 +1 @@ +15 1