# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer:
pkgname=py3-treq
pkgver=22.2.0
pkgrel=4
pkgdesc="py3-requests-like API build on top of Twisted's HTTP client"
url="https://github.com/twisted/treq"
arch="noarch"
license="MIT"
depends="python3 py3-incremental py3-requests py3-twisted py3-attrs"
makedepends="py3-setuptools"
checkdepends="py3-httpbin py3-openssl py3-pytest py3-mock py3-service_identity py3-twisted-tests"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/twisted/treq/archive/release-$pkgver.tar.gz"
builddir="$srcdir/treq-release-$pkgver"

# note(Leo): Replace the GHSA with CVEs once it comes out
#
# secfixes:
#   22.1.0-r0:
#     - GHSA-fhpf-pp6p-55qc

build() {
	python3 setup.py build
}

check() {
	rm -f src/treq/test/test_treq_integration.py
	python3 -m pytest
}

package() {
	python3 setup.py install --skip-build --root="$pkgdir"
}

sha512sums="
fa69bde03be083236fee7bd8adfd549578eb46f7dbb51d2a5acb1923a8e7d047d81de0a0c9ac407ac7ac6f11a677ffa57a6203b7fd139534eb698d987f019d69  py3-treq-22.2.0.tar.gz
"
