blob: 880cbd407538c205ca620e0058247569653924dd (
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
50
51
52
53
|
# Contributor: Fabian Affolter <fabian@affolter-engineering.ch>
# Maintainer: Fabian Affolter <fabian@affolter-engineering.ch>
pkgname=py-ujson
_pkgname=ujson
pkgver=1.35
pkgrel=2
pkgdesc="A fast Python JSON encoder and decoder"
url="http://github.com/esnme/ultrajson"
arch="all"
license="BSD"
makedepends="python2-dev py-setuptools python3-dev"
checkdepends="py3-tz py3-six"
subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2"
source="$_pkgname-$pkgver.tar.gz::https://github.com/esnme/ultrajson/archive/v$pkgver.tar.gz
lower-stack-usage.patch"
builddir="$srcdir"/ultrajson-$pkgver
build() {
cd "$builddir"
python2 setup.py build
python3 setup.py build
}
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"
}
check() {
cd "$builddir"
ln -s ./build/lib.*/ujson.*.so ujson.so
PYTHONPATH=. python3 tests/tests.py
}
sha512sums="cd5dc8d08e072cf703aec7d689070713f7073c22f13167d7e10a89219179248d6668894c1d742ca658672bb82e1dccbf72e3fd69e036d8cb2ee0ee799d10db11 ujson-1.35.tar.gz
e3755dea5845d735afc32c3fc6ee569f1a36d51203812409446c3cb62d207c1fea934935adaf1787b5ac549765e2dfdd18790f2eb0c15b28c5fec61a45874738 lower-stack-usage.patch"
|