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

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

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}"/usr/share/licenses/python-${_realname}/LICENSE
}
