aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2020-02-04 16:01:27 +0100
committerJakub Jirutka <jakub@jirutka.cz>2020-02-04 15:58:39 +0100
commit5e2af39afbcd6a7530560bf24e9338705953b844 (patch)
tree3b6eb9f5dbf222e5c8484b96aab52f017d57cc03
parentd90d6872a7edebdb06f8b8a836c2858b005c1512 (diff)
downloadaports-5e2af39afbcd6a7530560bf24e9338705953b844.tar.bz2
aports-5e2af39afbcd6a7530560bf24e9338705953b844.tar.xz
main/uwsgi: simplify abuild after purging python2
-rw-r--r--main/uwsgi/APKBUILD23
1 files changed, 9 insertions, 14 deletions
diff --git a/main/uwsgi/APKBUILD b/main/uwsgi/APKBUILD
index 6c9daff296..1240e23eca 100644
--- a/main/uwsgi/APKBUILD
+++ b/main/uwsgi/APKBUILD
@@ -44,7 +44,6 @@ options="!check"
# 2.0.16-r0:
# - CVE-2018-6758
-# Plugins for Python 3 or without compile dependency on Python.
# You may specify a custom name for so lib and subpackage after a colon.
_plugins="
alarm_curl
@@ -124,9 +123,6 @@ for _p in $_plugins; do
subpackages="$subpackages uwsgi-${_p#*:}:_plugin"
done
-_desc_gevent3="uWSGI plugin for gevent (Python 3)"
-_desc_python3="uWSGI plugin for Python 3"
-
prepare() {
default_prepare
@@ -142,19 +138,17 @@ build() {
export UWSGICONFIG_LUAPC="lua5.3"
- local item
- for item in $_plugins; do
- _build python3 "$item"
+ local item; for item in $_plugins; do
+ _build_plugin "${item%:*}" "${item#*:}"
done
}
-_build() {
- local python="$1"
- local plugin="${2%:*}"
- local myname="${2#*:}"
+_build_plugin() {
+ local plugin="$1"
+ local myname="$2"
msg "Building $plugin plugin ($myname)"
- $python uwsgiconfig.py --plugin plugins/$plugin alpine $myname
+ python3 uwsgiconfig.py --plugin plugins/$plugin alpine $myname
}
package() {
@@ -174,8 +168,7 @@ package() {
_plugin() {
local name="${subpkgname#$pkgname-}"
- local desc="$(eval "echo \$_desc_$name")"
- pkgdesc="${desc:-"uWSGI plugin $name"}"
+ pkgdesc="uWSGI plugin $name"
depends="uwsgi"
cd "$builddir"
@@ -198,12 +191,14 @@ _plugin() {
case "$name" in
# Mitigate breakages caused by injudicious rename in v3.11.
python3)
+ pkgdesc="uWSGI plugin for Python 3"
provides="uwsgi-python=$pkgver-r$pkgrel"
replaces="uwsgi-python"
ln -s python3_plugin.so "$subpkgdir"/usr/lib/uwsgi/python_plugin.so
;;
# Mitigate breakages caused by injudicious rename in v3.11.
gevent3)
+ pkgdesc="uWSGI plugin for gevent (Python 3)"
provides="uwsgi-gevent=$pkgver-r$pkgrel"
replaces="uwsgi-gevent"
ln -s gevent3_plugin.so "$subpkgdir"/usr/lib/uwsgi/gevent_plugin.so