# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org> # Contributor: Stunts <f.pinamartins[at]gmail.com> # Contributor: Phil Schaf <flying-sheep[at]web.de> # Contributor: Carl George < arch at cgtx dot us > # Maintainer: Mohamed Amine Zghal (medaminezghal) <medaminezghal at outlook dot com> _name=async-timeout pkgname=python-${_name} pkgver=5.0.1 pkgrel=1 pkgdesc='Timeout context manager for asyncio programs.' url='https://github.com/aio-libs/async-timeout' arch=('any') license=('Apache-2.0') depends=('python>=3.8') makedepends=('python-setuptools' 'python-build' 'python-installer' 'python-wheel') checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-cov') source=("https://files.pythonhosted.org/packages/source/${_name:0:1}/${_name}/${_name//-/_}-${pkgver}.tar.gz") sha256sums=('d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3') build() { cd ${_name//-/_}-${pkgver} python -m build --wheel --no-isolation } check(){ local pytest_options=( -vv --override-ini="addopts=" ) cd "${srcdir}"/${_name//-/_}-${pkgver} python -m venv --system-site-packages test-env test-env/bin/python -m installer dist/*.whl test-env/bin/python -m pytest "${pytest_options[@]}" tests } package() { cd ${_name//-/_}-${pkgver} python -m installer --destdir="$pkgdir" dist/*.whl }