aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-praw
diff options
context:
space:
mode:
Diffstat (limited to 'testing/py3-praw')
-rw-r--r--testing/py3-praw/APKBUILD56
-rw-r--r--testing/py3-praw/relax-version-requirements.patch18
2 files changed, 74 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"
diff --git a/testing/py3-praw/relax-version-requirements.patch b/testing/py3-praw/relax-version-requirements.patch
new file mode 100644
index 0000000000..3bfac8917c
--- /dev/null
+++ b/testing/py3-praw/relax-version-requirements.patch
@@ -0,0 +1,18 @@
+diff --git a/setup.py b/setup.py.new
+index 2cc9975725..1f2e5dffba 100644
+--- a/setup.py
++++ b/setup.py.new
+@@ -36,10 +36,10 @@ setup(name=PACKAGE_NAME,
+ description=('PRAW, an acronym for `Python Reddit API Wrapper`, is a '
+ 'python package that allows for simple access to '
+ 'reddit\'s API.'),
+- install_requires=['decorator >=4.0.9, <4.1',
+- 'prawcore >=0.3.0, <0.4',
++ install_requires=['decorator >=4.0.9, <4.4',
++ 'prawcore >=0.3.0',
+ 'requests >=2.3.0',
+- 'six ==1.10',
++ 'six >=1.10',
+ 'update_checker >=0.12'],
+ keywords='reddit api wrapper',
+ license='Simplified BSD License',