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

_pyname=trove_classifiers
pkgname=python-trove-classifiers
pkgver=2025.9.11.17
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=('931ca9841a5e9c9408bc2ae67b50d28acf85bef56219b56860876dd1f2d024dd')

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"
}
