mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-12-08 23:03:46 +00:00
67 lines
1.9 KiB
Bash
67 lines
1.9 KiB
Bash
# $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)
|
|
pkgver=1.14
|
|
pkgrel=2
|
|
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')
|
|
source=("git+https://github.com/stefankoegl/python-json-patch.git#tag=v$pkgver"
|
|
python3.6.patch)
|
|
sha512sums=('SKIP'
|
|
'e6f536bf89002cbdce63828fbc9f37690cf23fddad3b300258766b18bd735fc9ac22f6cd3f8ecf59e79206721ca31b2867ab1518efb578d86f485a2d63b07fcc')
|
|
|
|
prepare(){
|
|
(cd python-json-patch; patch -p1 -i ../python3.6.patch)
|
|
|
|
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
|
|
}
|