mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2025-03-19 00:21:40 +00:00
community/python-jsonpatch to 1.25-2
This commit is contained in:
parent
8d76c05d76
commit
35c9c491bd
1 changed files with 7 additions and 31 deletions
|
@ -3,58 +3,34 @@
|
||||||
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
|
# Contributor: Limao Luo <luolimao+AUR@gmail.com>
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - drop python{,2}-pypandoc makedepends
|
# - drop python-pypandoc makedepends
|
||||||
|
|
||||||
pkgbase=python-jsonpatch
|
pkgname=python-jsonpatch
|
||||||
pkgname=(python-jsonpatch python2-jsonpatch)
|
|
||||||
pkgver=1.25
|
pkgver=1.25
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="An implementation of the JSON Patch format"
|
pkgdesc="An implementation of the JSON Patch format"
|
||||||
arch=("any")
|
arch=("any")
|
||||||
url="https://github.com/stefankoegl/python-json-patch"
|
url="https://github.com/stefankoegl/python-json-patch"
|
||||||
license=("BSD")
|
license=("BSD")
|
||||||
makedepends=("python-setuptools" "python2-setuptools" "python-jsonpointer" "python2-jsonpointer")
|
depends=("python-jsonpointer")
|
||||||
checkdepends=('python-coverage' 'python2-coverage')
|
makedepends=("python-setuptools")
|
||||||
source=("$pkgbase-$pkgver.tar.gz::https://github.com/stefankoegl/python-json-patch/archive/v$pkgver.tar.gz")
|
checkdepends=('python-coverage')
|
||||||
|
source=("$pkgname-$pkgver.tar.gz::https://github.com/stefankoegl/python-json-patch/archive/v$pkgver.tar.gz")
|
||||||
sha512sums=('5e1d5b6dcb6ee847ddd561400fe2d00e07aa1827a63ab98a38cd5e91fa0e52d8635eba1192edbccf9c7b9ce9c7ce0a414d580665c427c87a820e533d26092ad6')
|
sha512sums=('5e1d5b6dcb6ee847ddd561400fe2d00e07aa1827a63ab98a38cd5e91fa0e52d8635eba1192edbccf9c7b9ce9c7ce0a414d580665c427c87a820e533d26092ad6')
|
||||||
|
|
||||||
prepare(){
|
|
||||||
cp -a python-json-patch-$pkgver{,-py2}
|
|
||||||
find python-json-patch-$pkgver-py2 -name \*.py -exec sed -i '1s/python$/&2/' {} +
|
|
||||||
}
|
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
cd "$srcdir"/python-json-patch-$pkgver
|
cd "$srcdir"/python-json-patch-$pkgver
|
||||||
python setup.py build
|
python setup.py build
|
||||||
|
|
||||||
cd "$srcdir"/python-json-patch-$pkgver-py2
|
|
||||||
python2 setup.py build
|
|
||||||
}
|
}
|
||||||
|
|
||||||
check() {
|
check() {
|
||||||
cd "$srcdir"/python-json-patch-$pkgver
|
cd "$srcdir"/python-json-patch-$pkgver
|
||||||
coverage run --source=jsonpatch tests.py
|
coverage run --source=jsonpatch tests.py
|
||||||
|
|
||||||
cd "$srcdir"/python-json-patch-$pkgver-py2
|
|
||||||
coverage2 run --source=jsonpatch tests.py
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package_python-jsonpatch() {
|
package_python-jsonpatch() {
|
||||||
depends=("python-jsonpointer")
|
|
||||||
|
|
||||||
cd "$srcdir"/python-json-patch-$pkgver
|
cd "$srcdir"/python-json-patch-$pkgver
|
||||||
|
|
||||||
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
install -Dm644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
|
||||||
python setup.py install --prefix=/usr --root="$pkgdir"
|
python setup.py install --prefix=/usr --root="$pkgdir"
|
||||||
}
|
}
|
||||||
package_python2-jsonpatch() {
|
|
||||||
depends=("python2-jsonpointer")
|
|
||||||
|
|
||||||
cd "$srcdir"/python-json-patch-$pkgver-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
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in a new issue