2021-10-06 16:45:44 +02:00
|
|
|
# Maintainer: Jelle van der Waa <jelle@archlinux.org>
|
|
|
|
# Maintainer: daurnimator <daurnimator@archlinux.org>
|
|
|
|
# Contributor: Daniel Micay <danielmicay@gmail.com>
|
|
|
|
# Contributor: Thomas Weißschuh <thomas_weissschuh lavabit com>
|
|
|
|
|
|
|
|
pkgname=httpie
|
2021-10-19 10:18:35 +02:00
|
|
|
pkgver=2.6.0
|
2021-10-06 16:45:44 +02:00
|
|
|
pkgrel=1
|
|
|
|
pkgdesc="human-friendly CLI HTTP client for the API era"
|
|
|
|
url="https://github.com/httpie/httpie"
|
|
|
|
depends=('python-defusedxml'
|
|
|
|
'python-pygments'
|
|
|
|
'python-pysocks'
|
|
|
|
'python-requests'
|
2021-10-19 10:18:35 +02:00
|
|
|
'python-requests-toolbelt'
|
|
|
|
'python-charset-normalizer')
|
2021-10-06 16:45:44 +02:00
|
|
|
makedepends=('python-setuptools')
|
|
|
|
checkdepends=('python-pytest'
|
|
|
|
'python-pytest-httpbin'
|
|
|
|
'python-responses')
|
|
|
|
conflicts=(python-httpie)
|
|
|
|
replaces=(python-httpie python2-httpie)
|
|
|
|
license=('BSD')
|
|
|
|
arch=('any')
|
|
|
|
source=($pkgname-$pkgver.tar.gz::"https://github.com/httpie/httpie/archive/$pkgver.tar.gz")
|
2021-10-19 10:18:35 +02:00
|
|
|
sha256sums=('3bcd9a8cb2b11299da12d3af36c095c6d4b665e41c395898a07f1ae4d99fc14a')
|
2021-10-06 16:45:44 +02:00
|
|
|
|
|
|
|
build() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
python3 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd $pkgname-$pkgver
|
|
|
|
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/httpie/LICENSE"
|
|
|
|
python3 setup.py install --root="$pkgdir" --optimize=1
|
|
|
|
|
|
|
|
# Fix upstream, include them in MANIFEST.in and use data_files in setup.py to install them automatically
|
|
|
|
# TODO: add zsh support
|
|
|
|
install -Dm644 extras/httpie-completion.bash "$pkgdir"/usr/share/bash-completion/completions/http
|
|
|
|
install -Dm644 extras/httpie-completion.fish "$pkgdir"/usr/share/fish/vendor_completions.d/http.fish
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
|
|
|
cd $pkgname-$pkgver
|
2021-10-19 10:18:35 +02:00
|
|
|
PYTHONDONTWRITEBYTECODE=1 pytest tests
|
2021-10-06 16:45:44 +02:00
|
|
|
}
|