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

pkgname=python-zipp
pkgver=3.18.1
pkgrel=2
pkgdesc="Pathlib-compatible object wrapper for zip files"
url="https://github.com/jaraco/zipp"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('git' 'python-build' 'python-installer' 'python-setuptools-scm' 'python-wheel')
checkdepends=('python-pytest' 'python-pytest-enabler' 'python-pytest-mypy' 'python-jaraco.itertools'
              'python-more-itertools' 'python-big-o' 'python-pytest-ignore-flaky')
source=("git+https://github.com/jaraco/zipp.git#tag=v$pkgver")
sha512sums=('7a192eedd85e5aab7d9d2329d65b1f8638b50b1718c8924102d16d1aee888bf67692ba6f82fb23f2347a738de93b640934217c62f757102394f9e87b2b70db83')

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

check() {
  cd zipp
  pytest
}

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