diff options
author | Fabian Affolter <fabian@affolter-engineering.ch> | 2016-11-29 21:53:15 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2016-12-27 09:44:43 +0200 |
commit | 1605457212c52e0b49d11e66f50b5fb0aee33517 (patch) | |
tree | 80326b092fefa75e621c1510ca6fad75566840df /testing/py-ujson | |
parent | 0ced851a61df2404fda381a1ea8e53ae07a56846 (diff) | |
download | aports-1605457212c52e0b49d11e66f50b5fb0aee33517.tar.bz2 aports-1605457212c52e0b49d11e66f50b5fb0aee33517.tar.xz |
testing/py-ujson: upgrade to 1.35 and enable py3
Diffstat (limited to 'testing/py-ujson')
-rw-r--r-- | testing/py-ujson/APKBUILD | 53 |
1 files changed, 29 insertions, 24 deletions
diff --git a/testing/py-ujson/APKBUILD b/testing/py-ujson/APKBUILD index 3f2591b246..5d9db16b97 100644 --- a/testing/py-ujson/APKBUILD +++ b/testing/py-ujson/APKBUILD @@ -2,40 +2,45 @@ # Maintainer: Fabian Affolter <fabian@affolter-engineering.ch> pkgname=py-ujson _pkgname=ujson -pkgver=1.33 +pkgver=1.35 pkgrel=0 pkgdesc="A fast Python JSON encoder and decoder" url="http://github.com/esnme/ultrajson" arch="all" license="BSD" -depends="python2" -depends_dev="" -makedepends="python2-dev py-setuptools" -install="" -subpackages="" -source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.zip" - -_builddir="$srcdir"/$_pkgname-$pkgver -prepare() { - local i - cd "$_builddir" - for i in $source; do - case $i in - *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; - esac - done -} +makedepends="python2-dev py-setuptools python3-dev" +subpackages="py3-${pkgname/py-/}:_py3 py2-${pkgname/py-/}:_py2" +source="$_pkgname-$pkgver.tar.gz::https://github.com/esnme/ultrajson/archive/v$pkgver.tar.gz" +builddir="$srcdir"/ultrajson-$pkgver build() { - cd "$_builddir" + cd "$builddir" python2 setup.py build || return 1 + python3 setup.py build || return 1 } package() { - cd "$_builddir" - python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1 + 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" } -md5sums="8148a2493fff78940feab1e11dc0a893 ujson-1.33.zip" -sha256sums="68cf825f227c82e1ac61e423cfcad923ff734c27b5bdd7174495d162c42c602b ujson-1.33.zip" -sha512sums="0f1f66212fbf94c03e048ba64c3bd817c50443d1a29b87f6a3a38f697a050f38821be4ba36a3b17a96930c69ee92973ac31bdd41851dea071af14cd4bbaf8480 ujson-1.33.zip" +md5sums="e6377366fb45652f815c845b3e51bc59 ujson-1.35.tar.gz" +sha256sums="1e7761583065873bed8466a3692fa5539d4f15bebc7af1c8fcc63d322a46804f ujson-1.35.tar.gz" +sha512sums="cd5dc8d08e072cf703aec7d689070713f7073c22f13167d7e10a89219179248d6668894c1d742ca658672bb82e1dccbf72e3fd69e036d8cb2ee0ee799d10db11 ujson-1.35.tar.gz" |