main/py3-gpep517: change default opt level to 0

that's also what py3-installer uses, and it would
make `gpep517 install-wheel` invokations more neat
This commit is contained in:
ptrcnull 2023-11-17 19:19:19 +01:00 committed by Natanael Copa
parent 59ded11702
commit 06e67bfe2f
2 changed files with 20 additions and 1 deletions

View File

@ -2,7 +2,7 @@
pkgname=py3-gpep517
_pkgname=gpep517
pkgver=15
pkgrel=0
pkgrel=1
pkgdesc="Minimal backend script to aid installing Python packages through PEP 517-compliant build systems"
url="https://github.com/mgorny/gpep517/"
arch="noarch"
@ -11,6 +11,8 @@ depends="py3-installer python3"
subpackages="$pkgname-pyc"
source="https://github.com/mgorny/gpep517/archive/v$pkgver/gpep517-v$pkgver.tar.gz
gpep517
default-bytecode-levels.patch
"
builddir="$srcdir/$_pkgname-$pkgver"
@ -30,4 +32,5 @@ package() {
sha512sums="
7c3b878220e907ef801301eadc0e3031dd3c31770cc50bb7119ab32f9244c8a33792b4896ddeffc5d4b7be9f1d881fba5179de155f11845f510e455be59fb92e gpep517-v15.tar.gz
3e90bf2d94006672c66f5082812115903054b6e05a5d37aa9a0fd33f7b2c8368f13e5fbd3ea815c386d6155dcbf8babd69faa9ca27b95f35b35a4ef47974efd7 gpep517
d3174ce9ac13d124578fc5ace0bd7a2c8582a8075d5355bf781bfa7218155cd00a7a707e76f26bcb933c6f49786a59bb63147b3e2f9645d36c97647865250894 default-bytecode-levels.patch
"

View File

@ -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)})")