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

pkgname=python-webcolors
pkgver=24.11.1
pkgrel=1
pkgdesc="A library for working with color names and color value formats defined by the HTML and CSS specifications for use in documents on the Web"
url="https://github.com/ubernostrum/webcolors"
license=('BSD-3')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-pdm-backend')
source=("git+https://github.com/ubernostrum/webcolors.git#tag=$pkgver")
sha512sums=('4a0f5429dec74d8f3ef497cd5b2b5601d93e6ec658ce273df336d98d01fe188aa821befbdd6c73085cba892b4285f085bd0057e27f4afe9ec78840d88869f4ef')

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

check() {
  cd webcolors
  PYTHONPATH="$PWD"/src python -m unittest discover -vs .
}

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