aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py-diskcache/APKBUILD
blob: 592765919e4bd4f41481c5a594fcc349a861ae80 (plain)
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
37
38
39
40
41
42
43
44
45
46
47
48
49
# Contributor: William Pitcock <nenolod@dereferenced.org>
# Maintainer: William Pitcock <nenolod@dereferenced.org>
pkgname=py-diskcache
pkgver=2.8.3
pkgrel=0
pkgdesc="disk caching implementation"
url="http://pypi.python.org/pypi/diskcache/"
arch="noarch"
license="MIT"
depends=""
depends_dev=""
makedepends="python2-dev python3-dev py-setuptools"
install=""
subpackages="py2-diskcache:py2 py3-diskcache:py3"
source="https://files.pythonhosted.org/packages/source/d/diskcache/diskcache-$pkgver.tar.gz"

builddir="$srcdir"/diskcache-$pkgver

build() {
	cd "$_builddir"
	python2 setup.py build
	python3 setup.py build
}

package() {
	mkdir -p "$pkgdir"
}

_py() {
        local python="$1"
        pkgdesc="$pkgdesc ${python#python}"
        depends="$depends $python"
        install_if="$pkgname=$pkgver-r$pkgrel $python"

        cd "$builddir"
        $python setup.py install --prefix=/usr --root="$subpkgdir"
}

py2() {
	cd "$builddir"
	_py python2
}

py3() {
	cd "$builddir"
	_py python3
}

sha512sums="d96ac76dfb68cb817febd3f4ed8927a8409c02b13b4112a739528cade40f9a588c732dfc3148392dd12676380c3a2b006ee63b86f30ad70f5d205273003bf23d  diskcache-2.8.3.tar.gz"