aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-praw
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2016-11-29 22:24:01 +0000
committerTimo Teräs <timo.teras@iki.fi>2016-12-27 09:43:43 +0200
commit02597b69211fa64e98a8c57d5002385ab4b5756d (patch)
treeb982d8b162e3dc4db4e713862bf3b62910747f17 /testing/py-praw
parente5ef8085a93538bfdf2618ba71f861ea65faabf8 (diff)
downloadaports-02597b69211fa64e98a8c57d5002385ab4b5756d.tar.bz2
aports-02597b69211fa64e98a8c57d5002385ab4b5756d.tar.xz
testing/py-praw: upgrade to 4.0.0
Diffstat (limited to 'testing/py-praw')
-rw-r--r--testing/py-praw/APKBUILD57
1 files changed, 33 insertions, 24 deletions
diff --git a/testing/py-praw/APKBUILD b/testing/py-praw/APKBUILD
index 09e0f1beb4..43698df09b 100644
--- a/testing/py-praw/APKBUILD
+++ b/testing/py-praw/APKBUILD
@@ -2,40 +2,49 @@
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-praw
_pkgname=praw
-pkgver=3.3.0
+pkgver=4.0.0
pkgrel=0
pkgdesc="A Python module to access to reddit's API"
url="https://github.com/praw-dev/praw"
arch="noarch"
license="GPL3+"
-depends="python2 py-update-checker py-requests py-six"
-depends_dev=""
-makedepends="python2-dev py-setuptools"
-install=""
-subpackages=""
-source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip"
-
-_builddir="$srcdir"/$_pkgname-$pkgver
-prepare() {
- local i
- cd "$_builddir"
- for i in $source; do
- case $i in
- *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
- esac
- done
-}
+depends="py-update-checker py-requests py-six"
+makedepends="python2-dev py-setuptools python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$_pkgname-$pkgver.tar.gz::https://github.com/praw-dev/praw/archive/v$pkgver.tar.gz"
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
+ cd "$builddir"
python2 setup.py build || return 1
+ python3 setup.py build || return 1
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
+}
+
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
}
-md5sums="e923dddefa05f0ddd624a953c6fc1f81 praw-3.3.0.zip"
-sha256sums="dbd92207ed7b790e6d1a0b5150cc506ebfd5c84cb2cee182c0394d1f14d1489f praw-3.3.0.zip"
-sha512sums="bf27e143dfe8f411590cc20f5798f2d387b20d8c477bf02ee85fed2d7f0159223eba87fc960b170b4388b104337bb30af587e2cbdc5bf90590201ad05ffdb9d8 praw-3.3.0.zip"
+md5sums="889e92d898872196eebf0108c814ff68 praw-4.0.0.tar.gz"
+sha256sums="a204cd131ab8f3b8f35353060b34891b6ef27c9a57d798222af16748346650f8 praw-4.0.0.tar.gz"
+sha512sums="adf33b1e51cbbf1ed96ed57360ba25c9449e6649b6bd923d392c74814a2e296dec5b5bcae963dc8428dfb6d047a2eeaaf1fe6e902cfb9081b0875ab95e9dde6b praw-4.0.0.tar.gz"