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

_pyname=typing_extensions
pkgname=python-typing_extensions
pkgver=4.11.0
pkgrel=1
pkgdesc='Backported and Experimental Type Hints for Python 3.8+'
arch=(any)
url=https://github.com/python/typing_extensions
msys2_references=(
  'pypi:typing-extensions'
)
license=('spdx:PSF-2.0')
depends=(python)
makedepends=(
  python-build
  python-flit-core
  python-installer
)
source=("https://pypi.python.org/packages/source/${_pyname:0:1}/${_pyname}/${_pyname}-${pkgver}.tar.gz")
sha256sums=('83f085bd5ca59c80295fc2a82ab5dac679cbe02b9f33f7d83af68e241bea51b0')

build() {
  cd "${_pyname}-${pkgver}"

  python -m build --wheel --skip-dependency-check --no-isolation
}

check() {
  cd "${_pyname}-${pkgver}"

  python -m unittest discover src
}

package() {
  cd "${_pyname}-${pkgver}"

  python -m installer --destdir="${pkgdir}" dist/*.whl
}
