NAME="pypi-requests"
DESC="Elegant and simple HTTP library for Python"
VERSION="2.31.0"

FILES=(
  "https://files.pythonhosted.org/packages/source/r/requests/requests-${VERSION}.tar.gz"
  "requests-${VERSION}-use_system_certs-1.patch"
)
HASHES=(
  "941e175c276cd7d39d098092c56679a4"
  "ec8a2cc4f3f7a0df4ed5f576367017010276c59d57260ac7b0060238b2324904"
)

DEPENDS=(
  "pypi-urllib3" "pypi-idna" "pypi-charset-normalizer"
  "python3" "make-ca" "p11-kit"
)
BUILD=()

PACKAGE() {
  tar xf "requests-${VERSION}.tar.gz"
  cd "requests-${VERSION}"

  patch -Np1 -i "../requests-${VERSION}-use_system_certs-1.patch"
  python3 -m build --wheel --skip-dependency-check --no-isolation
  PYTHONPATH=src python3 -m installer --destdir="${ROOTDIR}" dist/*.whl

  cd .. && rm -r "requests-${VERSION}"
}
