summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--main/py-twisted/APKBUILD38
1 files changed, 28 insertions, 10 deletions
diff --git a/main/py-twisted/APKBUILD b/main/py-twisted/APKBUILD
index d87fe724617..516feaf603d 100644
--- a/main/py-twisted/APKBUILD
+++ b/main/py-twisted/APKBUILD
@@ -1,33 +1,51 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-twisted
_pkgname=Twisted
-pkgver=17.1.0
-pkgrel=1
+pkgver=19.2.1
+pkgrel=0
pkgdesc="Asynchronous networking framework written in Python."
url="http://twistedmatrix.com/"
arch="all"
license="MIT"
depends="py-crypto py-zope-interface py-constantly py-incremental"
-makedepends="python2-dev py-setuptools libtirpc-dev"
-install=""
-subpackages="$pkgname-doc"
+makedepends="python2-dev py-setuptools libtirpc-dev py3-setuptools python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3 $pkgname-doc"
source="https://twistedmatrix.com/Releases/${_pkgname}/${pkgver%.*}/${_pkgname}-${pkgver}.tar.bz2"
builddir="$srcdir"/"$_pkgname"-$pkgver
build() {
cd "$builddir"
- CFLAGS="$CFLAGS `pkgconf --cflags libtirpc`" python2 setup.py build || return 1
+ CFLAGS="$CFLAGS `pkgconf --cflags libtirpc`" python2 setup.py build
}
package() {
cd "$builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
- install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
_mans="pyhtmlizer.1 trial.1 twistd.1"
for _man in $_mans; do
install -m644 -D "$builddir"/docs/core/man/$_man \
- "$pkgdir"/usr/share/man/man1/$_man || return 1
+ "$pkgdir"/usr/share/man/man1/$_man
done
}
-sha512sums="e5eedc9a70b7e4d0ec18dddaa82aa9a784e96fd517db65c278d822d15e8bdc65a35307a5a0474eb68dcb73fcd5508086bec605580a9f2f767bcbe27d714b4966 Twisted-17.1.0.tar.bz2"
+_py2() {
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ local pyver="${1:6:1}"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py --quiet install --prefix=/usr --root="$subpkgdir"
+}
+
+sha512sums="b358c3082a9005f7065da182cec3561d77aa34f21fc1bb20b1acdb1ad3ac7e8b0793c5f7189baec7cfa79dd19a97c3ded9381e4e376a770108f7f6b318bec5f3 Twisted-19.2.1.tar.bz2"