# Contributor: Peter Bui <pnutzh4x0r@gmail.com>
# Maintainer: Steven Guikal <void@fluix.one>
pkgname=py3-requests
pkgver=2.32.4
pkgrel=0
pkgdesc="HTTP request library for Python3"
url="https://requests.readthedocs.io/"
arch="noarch"
license="Apache-2.0"
# Requirements for tests are not available in main
options="!check"
depends="
	py3-certifi
	py3-charset-normalizer
	py3-idna
	py3-urllib3
	python3
	"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="https://files.pythonhosted.org/packages/source/r/requests/requests-$pkgver.tar.gz"
builddir="$srcdir/requests-$pkgver"

replaces="py-requests" # Backwards compatibility
provides="py-requests=$pkgver-r$pkgrel" # Backwards compatibility

# secfixes:
#   2.32.3-r0:
#     - CVE-2024-35195
#   2.32.4-r0:
#     - CVE-2024-47081

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
8308da5ec2b1bd4442497dc8ecb21d4c1d3aba82987a264bc0f55b75d2522b303e5779f704d1b557a0f7d8a8f0a3533925cc34a58d98a95ce463a0dd59c5ac2d  requests-2.32.4.tar.gz
"
