mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-04 12:01:41 +02:00
testing/py-prawcore: new aport
dependency for py-praw
This commit is contained in:
parent
1a8a046342
commit
2ffda0a11b
58
testing/py-prawcore/APKBUILD
Normal file
58
testing/py-prawcore/APKBUILD
Normal file
@ -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"
|
||||
Loading…
x
Reference in New Issue
Block a user