# Maintainer: Antonio Rojas <arojas@archlinux.org>

_pipname=pep440
pkgname=python-$_pipname
pkgver=0.1.2
pkgrel=2
pkgdesc='A simple package with utils to check whether versions number match PEP 440'
arch=(any)
url='https://github.com/Carreau/pep440'
license=(custom)
depends=(python)
makedepends=(python-build python-installer python-flit-core)
checkdepends=(python-pytest-console-scripts)
source=(https://pypi.io/packages/source/p/$_pipname/$_pipname-$pkgver.tar.gz)
sha256sums=('58b37246cc2b13fee1ca2a3c092cb3704d21ecf621a5bdbb168e44e697f6d04d')

build() {
  cd $_pipname-$pkgver
  python -m build --wheel --no-isolation
}

package() {
  cd $_pipname-$pkgver
  python -m installer --destdir="$pkgdir" dist/*.whl

  install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
