pkgbase=python-httpbin pkgname=(python3-httpbin python2-httpbin) pkgver=0.4.1 pkgrel=1 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') 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 cd "$srcdir"/httpbin-py2 python2 test_httpbin.py } 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 }