Date: Tuesday, October 25, 2022 @ 12:08:26 Author: alerque Revision: 1334768
upgpkg: python-fakeredis 1.10.0-1 Modified: python-fakeredis/trunk/PKGBUILD ----------+ PKGBUILD | 62 +++++++++++++++++++++++++++++++++++++------------------------ 1 file changed, 38 insertions(+), 24 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2022-10-25 11:40:32 UTC (rev 1334767) +++ PKGBUILD 2022-10-25 12:08:26 UTC (rev 1334768) @@ -1,37 +1,51 @@ # Maintainer: Caleb Maclennan <[email protected]> # Contributor: Eli Schwartz <[email protected]> -_pkgname=fakeredis +# Upstream tests are pretty borked, especially the PyPi sources. Skip for now. +BUILDENV+=(!check) + +_pyname=fakeredis pkgname=python-fakeredis -pkgver=1.7.0 -pkgrel=2 -pkgdesc="Fake implementation of redis API (redis-py) for testing purposes" -arch=('any') -url="https://github.com/jamesls/${_pkgname}" -license=('BSD' 'MIT') -depends=('python-redis' 'python-six' 'python-sortedcontainers') -makedepends=('python-setuptools' 'python-lupa') -checkdepends=('python-pytest' 'python-pytest-asyncio' 'python-pytest-mock' 'python-hypothesis' 'python-aioredis') -optdepends=('python-lupa: for lua scripting support') -source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz") -sha512sums=('c3fe4608f8dbdd13288ff3cc45b7a43c246f9597bf0e8ea7f4c9da2b5de6c516176f62291b23b76a38af8298ea93c1d5870509662634c173c020f3c6fbdb4dd2') -b2sums=('7ca30667ca814d89c268e4a1f54192cd9557cd81ff12afb0fc7be7dab4c15a091306fce8a11446081e6be76fa6934821c4abb256b5566a85a585dcf5e8125ee2') +pkgver=1.10.0 +pkgrel=1 +pkgdesc='Fake implementation of redis API (redis-py) for testing purposes' +arch=(any) +url="https://github.com/dsoftwareinc/${_pyname}-py" +license=(BSD MIT) +depends=(python-importlib-metadata + python-redis + python-six + python-sortedcontainers) +makedepends=(python-{build,installer,wheel} + python-aioredis + python-packaging + python-lupa + python-poetry-core) +checkdepends=(python-pytest + python-pytest-asyncio + python-pytest-mock + python-hypothesis) +optdepends=('python-aioredis: for aioredis support' + 'python-packaging: for aioredis support' + 'python-lupa: for lua scripting support') +# _archive="$_pyname-py-$pkgver" +# source=("$url/archive/v$pkgver/$_archive.tar.gz") +_archive="$_pyname-$pkgver" +source=("https://files.pythonhosted.org/packages/source/${_pyname::1}/$_pyname/$_archive.tar.gz") +sha256sums=('2b02370118535893d832bcd3c099ef282de3f13b29ae3922432e2225794ec334') build(){ - cd ${_pkgname}-${pkgver} - - python setup.py build + cd "$_archive" + python -m build -wn } check() { - cd ${_pkgname}-${pkgver} - - PYTHONPATH="$PWD" pytest + cd "$_archive" + PYTHONPATH="$PWD" pytest } package() { - cd ${_pkgname}-${pkgver} - - python setup.py install --root="${pkgdir}" --optimize=1 --skip-build - install -Dm644 COPYING "${pkgdir}"/usr/share/licenses/${pkgname}/COPYING + cd "$_archive" + python -m installer -d "$pkgdir" dist/*.whl + install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE }
