mirror of
https://github.com/dslm4515/BMLFS.git
synced 2025-08-20 14:31:47 +00:00
Added build for gpep517 to install glad
This commit is contained in:
44
build-scripts/gpep517.build
Normal file
44
build-scripts/gpep517.build
Normal 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}/*
|
6
files/gpep517-alpine/gpep517
Normal file
6
files/gpep517-alpine/gpep517
Normal file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/python3
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
from gpep517.__main__ import main
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main())
|
16
patches/gpep517-alpine/default-bytecode-levels.patch
Normal file
16
patches/gpep517-alpine/default-bytecode-levels.patch
Normal 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)})")
|
||||
|
Reference in New Issue
Block a user