# Maintainer: Christoph Reiter <reiter.christoph@gmail.com>

_realname=certifi
pkgname="python-${_realname}"
pkgver=2024.2.2
pkgrel=1
pkgdesc="Python package for providing Mozilla's CA Bundle"
url='https://pypi.python.org/pypi/certifi'
license=('spdx:MPL-2.0')
arch=('any')
depends=("python")
makedepends=(
  "python-setuptools"
  "python-wheel"
  "python-build"
  "python-installer"
)
source=("https://pypi.io/packages/source/${_realname:0:1}/${_realname}/${_realname}-${pkgver}.tar.gz")
sha256sums=('0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f')

build() {
  cd "${srcdir}/${_realname}-${pkgver}"

  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "${srcdir}/${_realname}-${pkgver}"

  python -m installer --destdir="${pkgdir}" dist/*.whl
  install -D -m644 LICENSE "${pkgdir}${MINGW_PREFIX}"/share/licenses/python-${_realname}/LICENSE
}
