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

_pyname=typing_extensions
pkgname=python-typing_extensions
pkgver=4.15.0
pkgrel=1
pkgdesc='Backported and Experimental Type Hints for Python 3.8+'
arch=(any)
url=https://github.com/python/typing_extensions
msys2_references=(
  'purl: pkg: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=('0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466')

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
}
