aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTBK <tbk@jjtc.dk>2017-10-27 03:36:03 +0200
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-10-27 13:44:29 +0000
commit381765531d0c4fe58373a4ce255af1cc90153f65 (patch)
treed2f04c920307eac60521a890f2d469bea5db64d2
parent18a2facf53831e7297d02a69448dd8e772810440 (diff)
downloadaports-381765531d0c4fe58373a4ce255af1cc90153f65.tar.bz2
aports-381765531d0c4fe58373a4ce255af1cc90153f65.tar.xz
testing/py-jsonpatch: upgrade to 1.16
-rw-r--r--testing/py-jsonpatch/APKBUILD57
1 files changed, 32 insertions, 25 deletions
diff --git a/testing/py-jsonpatch/APKBUILD b/testing/py-jsonpatch/APKBUILD
index ccdccdc729..4cd5b45c4e 100644
--- a/testing/py-jsonpatch/APKBUILD
+++ b/testing/py-jsonpatch/APKBUILD
@@ -1,40 +1,47 @@
# Contributor: Matt Dainty <matt+alpine@bodgit-n-scarper.com>
-# Maintainer:
+# Maintainer: TBK <alpine@jjtc.eu>
pkgname=py-jsonpatch
-_pkgname=jsonpatch
-pkgver=1.13
+_pkgname=${pkgname#py-}
+pkgver=1.16
pkgrel=0
pkgdesc="Apply JSON-Patches (RFC 6902)"
url="https://github.com/stefankoegl/python-json-patch"
arch="noarch"
license="BSD"
-depends="python2 py-jsonpointer"
-makedepends=""
-install=""
-subpackages=""
+depends="py-jsonpointer"
+makedepends="python2-dev python3-dev py-setuptools"
+subpackages="py3-$_pkgname:_py3 py2-$_pkgname:_py2"
source="https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/$_pkgname/$_pkgname-$pkgver.tar.gz"
-
-_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
-}
+builddir="$srcdir"/$_pkgname-$pkgver
build() {
- cd "$_builddir"
- python2 setup.py build || return 1
+ cd "$builddir"
+ python2 setup.py build
+ python3 setup.py build
}
package() {
- cd "$_builddir"
- python2 setup.py install --prefix=/usr --root="$pkgdir" || return 1
+ mkdir -p "$pkgdir"
+}
+
+_py() {
+ local python="$1"
+ pkgdesc="$pkgdesc (for $python)"
+ depends="$depends $python"
+ install_if="$pkgname=$pkgver-r$pkgrel $python"
+
+ cd "$builddir"
+ $python setup.py install --prefix=/usr --root="$subpkgdir"
+}
+
+_py2() {
+ replaces="$pkgname"
+ depends="${depends//py-/py2-}"
+ _py python2
}
-md5sums="4d6650ced683f632e117bafe5d9f093b jsonpatch-1.13.tar.gz"
-sha256sums="9470656a08002e309632b59772b206ce0564c9a77b44c25f05f49dd2cad248d5 jsonpatch-1.13.tar.gz"
-sha512sums="23f0c92c2c8834d5e3129e9ba78ece7da2646dd60d5b0522b0f09d83e20057ef7517042e5ee8547804185d3ce23cff394c8fe78df93fad7999fae12cc5467a45 jsonpatch-1.13.tar.gz"
+_py3() {
+ depends="${depends//py-/py3-}"
+ _py python3
+}
+sha512sums="a7f6fc3b9e741ff8bd64aa04c15c66ac218b520f17b7870068f992dab0794129fbb8a385cdc7e424814a91246110b8b24fa99a20e0d37d9bdedc3bcdc3a8c170 jsonpatch-1.16.tar.gz"