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

pkgname=python-deprecated
pkgver=1.2.18
pkgrel=1
pkgdesc="Python @deprecated decorator to deprecate old python classes, functions or methods"
url="https://github.com/tantale/deprecated"
license=('MIT')
arch=('any')
depends=('python' 'python-wrapt')
makedepends=('git' 'python-setuptools' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest')
source=("git+https://github.com/tantale/deprecated.git#tag=v$pkgver")
sha512sums=('b20a75bea1ff5f3236d7eb84879a4bd15b569aeee03759b110bde624dd5935740784301bd78a168a70a1af2ba54aa19545eb40bbb318071fae02f369d64fef78')

build() {
  cd deprecated
  python -m build --wheel --no-isolation
}

check() {
  cd deprecated
  pytest
}

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