# Contributor: Fabian Affolter # Maintainer: Fabian Affolter setglobal pkgname = 'py-ujson' setglobal _pkgname = 'ujson' setglobal pkgver = '1.35' setglobal pkgrel = '2' setglobal pkgdesc = '"A fast Python JSON encoder and decoder'" setglobal url = '"http://github.com/esnme/ultrajson'" setglobal arch = '"all'" setglobal license = '"BSD'" setglobal makedepends = '"python2-dev py-setuptools python3-dev'" setglobal checkdepends = '"py3-tz py3-six'" setglobal subpackages = ""py3-$(pkgname/py-/):_py3 py2-$(pkgname/py-/):_py2"" setglobal source = ""$_pkgname-$pkgver.tar.gz::https://github.com/esnme/ultrajson/archive/v$pkgver.tar.gz lower-stack-usage.patch"" setglobal builddir = ""$srcdir"/ultrajson-$pkgver" proc build { cd $builddir python2 setup.py build python3 setup.py build } proc package { mkdir -p $pkgdir } proc _py2 { setglobal replaces = $pkgname _py python2 } proc _py3 { _py python3 } proc _py { local python="$1" setglobal pkgdesc = ""$pkgdesc (for $python)"" setglobal install_if = ""$pkgname=$pkgver-r$pkgrel $python"" cd $builddir $python setup.py install --prefix=/usr --root="$subpkgdir" } proc check { cd $builddir ln -s ./build/lib.*/ujson.*.so ujson.so env PYTHONPATH=. python3 tests/tests.py } setglobal sha512sums = '"cd5dc8d08e072cf703aec7d689070713f7073c22f13167d7e10a89219179248d6668894c1d742ca658672bb82e1dccbf72e3fd69e036d8cb2ee0ee799d10db11 ujson-1.35.tar.gz e3755dea5845d735afc32c3fc6ee569f1a36d51203812409446c3cb62d207c1fea934935adaf1787b5ac549765e2dfdd18790f2eb0c15b28c5fec61a45874738 lower-stack-usage.patch'"