2016-02-26 13:40:30 +00:00
|
|
|
# $Id$
|
|
|
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
|
|
|
|
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
|
|
|
|
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
|
|
# - drop python{,2}-pypandoc makedepends
|
|
|
|
|
|
|
|
pkgbase=python-jsonpatch
|
|
|
|
_pkgname=jsonpatch
|
|
|
|
pkgname=(python-jsonpatch python2-jsonpatch)
|
2016-06-01 12:30:27 +00:00
|
|
|
pkgver=1.14
|
2017-01-06 13:37:28 +00:00
|
|
|
pkgrel=2
|
2016-02-26 13:40:30 +00:00
|
|
|
pkgdesc="An implementation of the JSON Patch format"
|
|
|
|
arch=("any")
|
|
|
|
url="https://github.com/stefankoegl/python-json-patch"
|
|
|
|
license=("BSD")
|
|
|
|
makedepends=("python-setuptools" "python2-setuptools" "python-jsonpointer" "python2-jsonpointer"
|
|
|
|
"git")
|
|
|
|
checkdepends=('python-coverage' 'python2-coverage')
|
2017-01-06 13:37:28 +00:00
|
|
|
source=("git+https://github.com/stefankoegl/python-json-patch.git#tag=v$pkgver"
|
|
|
|
python3.6.patch)
|
|
|
|
sha512sums=('SKIP'
|
|
|
|
'e6f536bf89002cbdce63828fbc9f37690cf23fddad3b300258766b18bd735fc9ac22f6cd3f8ecf59e79206721ca31b2867ab1518efb578d86f485a2d63b07fcc')
|
2016-02-26 13:40:30 +00:00
|
|
|
|
|
|
|
prepare(){
|
2017-01-06 13:37:28 +00:00
|
|
|
(cd python-json-patch; patch -p1 -i ../python3.6.patch)
|
|
|
|
|
2016-02-26 13:40:30 +00:00
|
|
|
cp -a python-json-patch{,-py2}
|
|
|
|
find python-json-patch-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} +
|
|
|
|
}
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd "$srcdir"/python-json-patch
|
|
|
|
python setup.py build
|
|
|
|
|
|
|
|
cd "$srcdir"/python-json-patch-py2
|
|
|
|
python2 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd "$srcdir"/python-json-patch
|
|
|
|
coverage run --source=jsonpatch tests.py
|
|
|
|
|
|
|
|
cd "$srcdir"/python-json-patch-py2
|
|
|
|
coverage2 run --source=jsonpatch tests.py
|
|
|
|
}
|
|
|
|
|
|
|
|
package_python-jsonpatch() {
|
|
|
|
depends=("python-jsonpointer")
|
|
|
|
|
|
|
|
cd "$srcdir"/python-json-patch
|
|
|
|
|
|
|
|
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
|
|
|
python setup.py install --prefix=/usr --root="$pkgdir"
|
|
|
|
}
|
|
|
|
package_python2-jsonpatch() {
|
|
|
|
depends=("python2-jsonpointer")
|
|
|
|
|
|
|
|
cd "$srcdir"/python-json-patch-py2
|
|
|
|
|
|
|
|
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
|
|
|
python2 setup.py install --prefix=/usr --root="$pkgdir"
|
|
|
|
for _bin in "$pkgdir"/usr/bin/*; do
|
|
|
|
mv "$_bin"{,2}
|
|
|
|
done
|
|
|
|
}
|