blob: 78f50552da52538f6e7d924452b2fee5d0a946e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
# 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
}
|