aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-twisted
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-10-23 08:21:44 -0300
committerLeo <thinkabit.ukim@gmail.com>2019-10-23 08:21:45 -0300
commitfb7cae7994619fcfaeb63fcc805efa49a8a1dab5 (patch)
treee5844082c92803cc591c90306d2c4e3eb5cb60f7 /community/py3-twisted
parent4883d3640f91a104634c63ab7bb4b4e4d0e9f5ab (diff)
downloadaports-fb7cae7994619fcfaeb63fcc805efa49a8a1dab5.tar.bz2
aports-fb7cae7994619fcfaeb63fcc805efa49a8a1dab5.tar.xz
community/py3-twisted: drop python2
Diffstat (limited to 'community/py3-twisted')
-rw-r--r--community/py3-twisted/APKBUILD46
1 files changed, 17 insertions, 29 deletions
diff --git a/community/py3-twisted/APKBUILD b/community/py3-twisted/APKBUILD
index 56fec31b3e..f17f4c4a99 100644
--- a/community/py3-twisted/APKBUILD
+++ b/community/py3-twisted/APKBUILD
@@ -1,25 +1,29 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
-pkgname=py-twisted
+pkgname=py3-twisted
_pkgname=Twisted
pkgver=19.2.1
-pkgrel=2
-pkgdesc="Asynchronous networking framework written in Python."
+pkgrel=3
+pkgdesc="Asynchronous networking framework written in Python3"
url="http://twistedmatrix.com/"
arch="all"
license="MIT"
-depends="py-crypto py-zope-interface py-constantly py-incremental py-attrs"
-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"
+depends="python3 py3-crypto py3-zope-interface py3-constantly py3-incremental py3-attrs
+ py3-pyhamcrest py3-hyperlink py3-automat"
+makedepends="libtirpc-dev py3-setuptools python3-dev"
+subpackages="$pkgname-doc"
+source="https://twistedmatrix.com/Releases/$_pkgname/${pkgver%.*}/$_pkgname-$pkgver.tar.bz2"
builddir="$srcdir"/"$_pkgname"-$pkgver
+replaces="py-twisted" # Backwards compatibility
+provides="py-twisted=$pkgver-r$pkgrel" # Backwards compatibility
+
build() {
- cd "$builddir"
- CFLAGS="$CFLAGS $(pkgconf --cflags libtirpc)" python2 setup.py build
+ CFLAGS="$CFLAGS $(pkgconf --cflags libtirpc)" python3 setup.py build
}
package() {
- cd "$builddir"
+ python3 setup.py install --prefix=/usr --root="$pkgdir"
+
_mans="pyhtmlizer.1 trial.1 twistd.1"
for _man in $_mans; do
install -m644 -D "$builddir"/docs/core/man/$_man \
@@ -27,25 +31,9 @@ package() {
done
}
-_py2() {
- depends="${depends//py-/py2-}"
- _py python2
-}
-
-_py3() {
- depends="${depends//py-/py3-} py3-pyhamcrest py3-hyperlink py3-automat"
- _py python3
-}
-
-_py() {
- local python="$1"
- local pyver="${1#python}"
- 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"
+doc() {
+ replaces="py-twisted-doc" # Backwards compatibility
+ default_doc
}
sha512sums="b358c3082a9005f7065da182cec3561d77aa34f21fc1bb20b1acdb1ad3ac7e8b0793c5f7189baec7cfa79dd19a97c3ded9381e4e376a770108f7f6b318bec5f3 Twisted-19.2.1.tar.bz2"