aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-requests-cache/APKBUILD
blob: 345b0280ed6513230163345607df0eef595e22c8 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# Contributor: Philipp Glaum <p@pglaum.de>
# Maintainer: Philipp Glaum <p@pglaum.de>
pkgname=py3-requests-cache
_pkgname=requests-cache
pkgver=0.5.2
pkgrel=1
pkgdesc="Persistent cache for requests library"
url="https://pypi.org/project/requests-cache/"
arch="noarch"
license="BSD-3-Clause"
depends="python3 py3-requests"
makedepends="py3-setuptools"
checkdepends="py3-mock"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
options="net" # Required for tests
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare
	# Invoke python3
	sed -i "s|os.system('python %s' % test)|os.system('python3 %s' % test)|" setup.py
}

build() {
	python3 setup.py build
}

check() {
	python3 setup.py test
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="355cc571a46b768615606a907a69ed065b3c4b5e74bb6c311abc7a28d9406f32fdea1db0dfd2b1c32dcdc82ed817ef7e0b30086c069de57307254617604c5177  requests-cache-0.5.2.tar.gz"