Added build for gpep517 to install glad

This commit is contained in:
dslm4515
2024-02-16 12:29:34 -06:00
parent 5d47588171
commit 73359e96d0
3 changed files with 66 additions and 0 deletions

View File

@ -0,0 +1,44 @@
#! /bin/bash
# gpep517
# Source: https://github.com/projg2/gpep517/archive/refs/tags/v15.tar.gz
#
# $BUILD = Directory to temporarily install
# $PKGS = Directory to store built packages
#
# DEPS
# Required: tomli
# Recommended: NONE
# Optional: NONE
patch -Np1 -i ../patches/gpep517-alpine/default-bytecode-levels.patch
export sitedir="$(python3 -c 'import site;print(site.getsitepackages()[0])')"
sudo mkdir -pv $BUILD${sitedir}
sudo cp -av gpep517 $BUILD${sitedir}/
sudo python3 -m compileall $BUILD${sitedir}
sudo mkdir -pv $BUILD/usr/bin
sudo cp -v ../files/gpep517-alpine/gpep517 $BUILD/usr/bin/
cd $BUILD && sudo -S mkdir -v ${BUILD}/install &&
cat > /tmp/slack-desc << "EOF"
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':' except on otherwise blank lines.
|-----handy-ruler------------------------------------------------------|
gpep517: gpep517
gpep517:
gpep517: Minimal backend script to aid installing Python packages through PEP
gpep517: 517-compliant build systems
gpep517:
gpep517: https://github.com/mgorny/gpep517
gpep517:
EOF
sudo -S mv -v /tmp/slack-desc install/ &&
sudo -S makepkg -l y -c n $PKGS/gpep517-15-$PSUFFIX &&
sudo -S rm -rf ${BUILD}/*

View File

@ -0,0 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
import sys
from gpep517.__main__ import main
if __name__ == "__main__":
sys.exit(main())

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