34 lines
1.3 KiB
Bash

# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
pkgname=python-lazy-object-proxy
pkgver=1.10.0
pkgrel=4
pkgdesc='A fast and thorough lazy object proxy'
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/ionelmc/python-lazy-object-proxy"
license=('BSD-2-Clause')
depends=("python")
makedepends=('python-setuptools-scm' 'python-build' 'python-installer' 'python-wheel')
checkdepends=('python-pytest-benchmark')
source=("https://github.com/ionelmc/python-lazy-object-proxy/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('618e900b0314b2c39fb3fca21592b4a24216af7044185c413bd06235dc274ebf303299143648e5c026b62f3d0b977b5d31c667f2a31f3a768174915a5c1320bd')
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
build() {
cd python-lazy-object-proxy-$pkgver
python -m build --wheel --no-isolation
}
check() {
cd python-lazy-object-proxy-$pkgver
local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
PYTHONPATH="$PWD/build/lib.linux-$CARCH-cpython-${python_version}" pytest
}
package() {
cd python-lazy-object-proxy-$pkgver
python -m installer --destdir="$pkgdir" dist/*.whl
install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}