# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-webcolors
pkgver=25.10.0
pkgrel=2
pkgdesc="A library for working with the color formats defined by HTML and CSS"
url="https://github.com/ubernostrum/webcolors"
license=('BSD-3-Clause')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-pdm-backend')
checkdepends=('python-pytest')
source=("git+https://github.com/ubernostrum/webcolors.git#tag=$pkgver")
sha512sums=('b3cdd920278212b5c86d83b6f70c398bd773dc5c7fef8897514bf08c6ce389378bf52f6afc66e073111d4ee007574d8f10b1d30785b07ab505bfbb05a269b41d')

build() {
  cd webcolors
  python -m build -nw
}

check() {
  cd webcolors
  PYTHONPATH="$PWD"/src pytest
}

package() {
  cd webcolors
  python -m installer -d "$pkgdir" dist/*.whl
}
