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

_name=pathspec
pkgname=python-pathspec
pkgver=1.0.3
pkgrel=1
pkgdesc='Utility library for gitignore style pattern matching of file paths'
arch=('any')
url=https://github.com/cpburnz/python-pathspec
msys2_references=(
  "purl: pkg:pypi/pathspec"
)
license=('spdx: MPL-2.0')
depends=('python')
makedepends=(
  'python-build'
  'python-flit-core'
  'python-installer'
)
source=("https://files.pythonhosted.org/packages/source/${_name::1}/$_name/$_name-$pkgver.tar.gz")
sha256sums=('bac5cf97ae2c2876e2d25ebb15078eb04d76e4b98921ee31c6f85ade8b59444d')

build() {
  cd "$_name-$pkgver"
  python -m build --wheel --skip-dependency-check --no-isolation
}

package() {
  cd "$_name-$pkgver"
  python -m installer --destdir="$pkgdir" dist/*.whl
  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
