# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Filipe Laíns (FFY00) <lains@archlinux.org>

_pkgname=typing_inspect
pkgname=python-$_pkgname
pkgver=0.9.0
pkgrel=4
pkgdesc='Runtime inspection utilities for Python typing module'
arch=(any)
url='https://github.com/ilevkivskyi/typing_inspect'
license=('MIT')
depends=('python-mypy_extensions' 'python-typing_extensions')
makedepends=('python-setuptools')
checkdepends=('python-pytest')
source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz"
        $pkgname-support-py39-generic-types.patch::https://github.com/thatch/typing_inspect/commit/67b455cf5a7e.patch)
sha512sums=('106597b100c3abda89cc15e0f0cd1fbcc771cb04e15e1d85da2134b9937d1a9b8d1fb396aa94fc350d8e21eeaa7f96f4c98c08923360f7eb1fb5b7b7d1a32df5'
            '74800c6934fcac7198fda7a68237369452d83a7d8cb194015d114a966572faceef5d2aa511a0a37f2d95c3065e615d9de691f604d7d500570a96c7a18190c46d')

build() {
  cd $_pkgname-$pkgver

  python setup.py build
}

check() {
  cd $_pkgname-$pkgver

  pytest .
}

package() {
  cd $_pkgname-$pkgver

  python setup.py install --root="$pkgdir" --optimize=1 --skip-build

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

# vim:set ts=2 sw=2 et:
