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

_pyname=trove_classifiers
pkgname=python-trove-classifiers
pkgver=2025.8.6.13
pkgrel=1
pkgdesc="Canonical source for classifiers on PyPI (pypi.org)"
arch=('any')
url="https://github.com/pypa/trove-classifiers"
msys2_references=(
  "anitya: 88298"
  "archlinux: python-trove-classifiers"
  "gentoo: dev-python/trove-classifiers"
  "purl: pkg:pypi/trove-classifiers"
)
license=('spdx:Apache-2.0')
depends=(
  'python'
)
makedepends=(
  'python-build'
  'python-installer'
  'python-setuptools'
  'python-calver'
)
source=("https://pypi.org/packages/source/${_pyname::1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('5a0abad839d2ed810f213ab133d555d267124ddea29f1d8a50d6eca12a50ae6e')

build() {
  cd "${_pyname}-${pkgver}"

  python -m build --wheel --no-isolation
}

package() {
  cd "${_pyname}-${pkgver}"

  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
