aboutsummaryrefslogtreecommitdiffstats
path: root/testing
diff options
context:
space:
mode:
authorKevin Daudt <ops@ikke.info>2018-09-17 19:09:39 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-09-27 06:18:40 +0000
commit2ffda0a11bee55e51ffd08059606d56be69a4079 (patch)
treeaf3816adeab065489db187122a2d1881ce4ee582 /testing
parent1a8a04634245f476ec6239633a403f09a22f44e6 (diff)
downloadaports-2ffda0a11bee55e51ffd08059606d56be69a4079.tar.bz2
aports-2ffda0a11bee55e51ffd08059606d56be69a4079.tar.xz
testing/py-prawcore: new aport
dependency for py-praw
Diffstat (limited to 'testing')
-rw-r--r--testing/py-prawcore/APKBUILD58
1 files changed, 58 insertions, 0 deletions
diff --git a/testing/py-prawcore/APKBUILD b/testing/py-prawcore/APKBUILD
new file mode 100644
index 0000000000..077bda543c
--- /dev/null
+++ b/testing/py-prawcore/APKBUILD
@@ -0,0 +1,58 @@
+# Contributor: Kevin Daudt <kdaudt@alpinelinux.org>
+# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org>
+pkgname=py-prawcore
+pkgver=1.0.0
+pkgrel=0
+pkgdesc="a low-level communication layer for PRAW 4+"
+url="https://github.com/praw-dev/prawcore"
+arch="noarch"
+license="BSD-2-Clause"
+depends="py-setuptools"
+makedepends="python2-dev python3-dev"
+subpackages="py2-${pkgname#py-}:_py2 py3-${pkgname#py-}:_py3"
+source="$pkgname-$pkgver.tar.gz::https://github.com/praw-dev/prawcore/archive/v$pkgver.tar.gz"
+builddir="$srcdir/prawcore-$pkgver"
+
+build() {
+ cd "$builddir"
+
+ python2 setup.py build
+ python3 setup.py build
+}
+
+check() {
+ cd "$builddir"
+
+ python2 setup.py test
+ python3 setup.py test
+}
+
+package() {
+ cd "$builddir"
+
+ mkdir -p "$pkgdir"
+}
+
+_py2() {
+ 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="01ba210b56aedb8f697f13650ac2a763ef034e668ee9a84962e1567cada894adf6088a536d32b67d44edfbbec24aed6c86d33aa56d003593961346e1319de69c py-prawcore-1.0.0.tar.gz"