desktop/python-httpbin/PKGBUILD
AlmAck 485710b9ed downgrade python-httpbin from 0.6 to 0.5 version
to many dependencies required
2017-11-06 21:09:03 +01:00

57 lines
1.5 KiB
Bash

pkgbase=python-httpbin
pkgname=(python3-httpbin python2-httpbin)
pkgver=0.5.0
pkgrel=2
pkgdesc="HTTP Request and Response Service"
arch=('any')
url="https://github.com/Runscope/httpbin"
license=('MIT')
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-flask' 'python2-flask'
'python3-markupsafe' 'python2-markupsafe' 'python3-itsdangerous' 'python2-itsdangerous'
'python3-six' 'python2-six' 'python3-decorator' 'python2-decorator' 'git'
'python3-flask-common' 'python2-flask-common' 'python3-crayons' 'python2-crayons')
source=("git+https://github.com/Runscope/httpbin.git#tag=v$pkgver")
sha256sums=('SKIP')
prepare() {
cp -a httpbin{,-py2}
}
build() {
cd "$srcdir"/httpbin
LC_CTYPE=en_US.UTF8 python3 setup.py build
cd "$srcdir"/httpbin-py2
python2 setup.py build
}
check() {
cd "$srcdir"/httpbin
python3 test_httpbin.py | true
cd "$srcdir"/httpbin-py2
python2 test_httpbin.py | true
}
package_python3-httpbin() {
depends=('python3-flask' 'python3-markupsafe' 'python3-itsdangerous'
'python3-six' 'python3-decorator')
cd httpbin
LC_CTYPE=en_US.UTF-8 python3 setup.py install -O1 --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
package_python2-httpbin() {
depends=('python2-flask' 'python2-markupsafe' 'python2-itsdangerous'
'python2-six' 'python2-decorator')
cd httpbin-py2
python2 setup.py install -O1 --root="$pkgdir"
install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}