From 318e38fe9f50ee23be155d0166d1d13bff52735a Mon Sep 17 00:00:00 2001 From: Leo Date: Tue, 2 Jul 2019 03:11:39 -0300 Subject: testing/py3-prawcore: rename from py-prawcore --- testing/py3-prawcore/APKBUILD | 58 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 testing/py3-prawcore/APKBUILD (limited to 'testing/py3-prawcore') diff --git a/testing/py3-prawcore/APKBUILD b/testing/py3-prawcore/APKBUILD new file mode 100644 index 0000000000..6a5ad54d32 --- /dev/null +++ b/testing/py3-prawcore/APKBUILD @@ -0,0 +1,58 @@ +# Contributor: Kevin Daudt +# Maintainer: Kevin Daudt +pkgname=py-prawcore +pkgver=1.0.1 +pkgrel=1 +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="6efe8faa685aa92a04309c4c24963a2a540335ad0bed31b990d840732ddf726789688171f4ead4daf831e89da5c95c17861a079dfc9ae3de254d2690bcff1c8b py-prawcore-1.0.1.tar.gz" -- cgit v1.2.3