diff options
author | Leo <thinkabit.ukim@gmail.com> | 2019-07-02 03:11:39 -0300 |
---|---|---|
committer | Leo <thinkabit.ukim@gmail.com> | 2019-07-02 07:04:03 -0300 |
commit | 318e38fe9f50ee23be155d0166d1d13bff52735a (patch) | |
tree | 37d97ccd101fab63855d89c367e72e1b520fcfda /testing/py3-prawcore/APKBUILD | |
parent | 9e4df4367f89ab407630c2df29e35dd60fbaf211 (diff) | |
download | aports-318e38fe9f50ee23be155d0166d1d13bff52735a.tar.bz2 aports-318e38fe9f50ee23be155d0166d1d13bff52735a.tar.xz |
testing/py3-prawcore: rename from py-prawcore
Diffstat (limited to 'testing/py3-prawcore/APKBUILD')
-rw-r--r-- | testing/py3-prawcore/APKBUILD | 58 |
1 files changed, 58 insertions, 0 deletions
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 <kdaudt@alpinelinux.org> +# Maintainer: Kevin Daudt <kdaudt@alpinelinux.org> +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" |