mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
485710b9ed
to many dependencies required
57 lines
1.5 KiB
Bash
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
|
|
}
|
|
|