42 lines
1.5 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=python-aspectlib
pkgver=1.5.2
pkgrel=8
pkgdesc="Development library for quickly writing configurable applications and daemons"
arch=(any)
license=('BSD-2-Clause')
url="https://github.com/ionelmc/python-aspectlib"
depends=('python' 'python-fields')
makedepends=('python-build' 'python-installer' 'python-setuptools' 'python-wheel')
checkdepends=('python-tornado' 'python-process-tests'
'python-profilestats' 'python-pytest') # 'mysql-python')
source=("$pkgname-$pkgver.tar.gz::https://github.com/ionelmc/python-aspectlib/archive/v$pkgver.tar.gz"
python310.patch)
sha512sums=('33642f828989d07c6af78bdf9adc9f2abbc419df89b878cfe7bd9c8df226a59401176b56b1f2b3ba48661ea5a145520de0bc7a0980226b742b0a79f31ab7dd7f'
'74b4261afd1fe20749f94dab067514eab12c484453607b820a96e1e8308fddbac4ac49ce24334c79c9fea6729877457ae60cb5004709106186c51d9af66087af')
prepare() {
cd python-aspectlib-$pkgver
# https://github.com/ionelmc/python-aspectlib/pull/22
patch -Np1 -i ../python310.patch
}
build() {
cd python-aspectlib-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd python-aspectlib-$pkgver
# https://github.com/ionelmc/python-aspectlib/issues/15
PYTHONPATH=src pytest --deselect tests/test_integrations_py3.py::test_decorate_tornado_coroutine
}
package() {
cd python-aspectlib-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}