aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-simplejson/APKBUILD
blob: cca067e84d78d920c8a58e37030775d55e97c358 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=py-simplejson
_pkgname=simplejson
pkgver=3.16.1
pkgrel=1
pkgdesc="Simple, fast, extensible JSON encoder/decoder for Python"
url="https://pypi.python.org/pypi/simplejson"
arch="all"
license="MIT"
makedepends="py3-setuptools py2-setuptools python2-dev python3-dev"
subpackages="py2-$_pkgname:_py2 py3-$_pkgname:_py3"
source="$pkgname-$pkgver.tar.gz::https://github.com/simplejson/simplejson/archive/v$pkgver.tar.gz"
builddir="$srcdir"/$_pkgname-$pkgver

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

check() {
	cd "$builddir"
	python2 setup.py test
	python3 setup.py test
}

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

_py2() {
	replaces="$pkgname"
	_py python2
}

_py3() {
	_py python3
}

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

	cd "$builddir"
	$python setup.py install --prefix=/usr --root="$subpkgdir"
	rm -Rf "$subpkgdir"/usr/lib/python*/site-packages/simplejson/tests/
}

sha512sums="41e9bfad5e9263b050109adeec28bdcb190230a26e8a48db86d24fa8729517e3eacd3c3905ff9900cc9a5a90fff006e8fb92a5ac85249922a0c46ab6391ee78b  py-simplejson-3.16.1.tar.gz"