aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-praw/APKBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py3-praw/APKBUILD')
-rw-r--r--testing/py3-praw/APKBUILD56
1 files changed, 56 insertions, 0 deletions
diff --git a/testing/py3-praw/APKBUILD b/testing/py3-praw/APKBUILD
new file mode 100644
index 0000000000..cccdc020e6
--- /dev/null
+++ b/testing/py3-praw/APKBUILD
@@ -0,0 +1,56 @@
+# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
+# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
+pkgname=py-praw
+_pkgname=praw
+pkgver=4.0.0
+pkgrel=3
+pkgdesc="A Python module to access to reddit's API"
+url="https://github.com/praw-dev/praw"
+arch="noarch"
+license="GPL-3.0-or-later"
+depends="py-prawcore 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
+ relax-version-requirements.patch"
+builddir="$srcdir"/$_pkgname-$pkgver
+
+build() {
+ cd "$builddir"
+ python2 setup.py build || return 1
+ python3 setup.py build || return 1
+}
+
+package() {
+ mkdir -p "$pkgdir"
+}
+
+check() {
+ cd "$builddir"
+ python2 setup.py test
+ python3 setup.py test
+}
+
+_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"
+}
+
+sha512sums="adf33b1e51cbbf1ed96ed57360ba25c9449e6649b6bd923d392c74814a2e296dec5b5bcae963dc8428dfb6d047a2eeaaf1fe6e902cfb9081b0875ab95e9dde6b praw-4.0.0.tar.gz
+d24fe8e817963fdc374d00faf2d18a2383b65feb8a06adc84b77663f43c123824caf03219546dcf3ebbb605e6f31e5f6963291b9aa632a6af8c8009ca38a5f75 relax-version-requirements.patch"