# Maintainer: Erich Eckner pkgname='python-openfoodfacts' pkgver=0.1.2 pkgrel=59 arch=('any') url='https://github.com/openfoodfacts/openfoodfacts-python' license=('MIT') pkgdesc='Open Food Facts client for your Python applications and scripts' _pkgname="${pkgname#*-}" source=("$_pkgname-$pkgver.tar.gz::https://github.com/openfoodfacts/openfoodfacts-python/archive/refs/tags/v$pkgver.tar.gz") sha512sums=('64ceb1f6ed391e712bf34131caec78555a832fa2b291bd7e782e6b68fea6c778498f0c43b19de1852522bd2c27fafc07ef7cc0bc8c4a4905174c4f22c5ae06d3') depends=( 'python<3.10' 'python>=3.9' 'python-requests>=2.20.0') makedepends=( 'python-setuptools') checkdepends=( 'python-pip' 'python-requests-mock>=1.8.0' 'python-wheel') build() { cd "${srcdir}/${_pkgname}-python-${pkgver}" python setup.py build } check() { cd "${srcdir}/${_pkgname}-python-${pkgver}" python setup.py test } package() { cd "${srcdir}/${_pkgname}-python-${pkgver}" python setup.py install --root="$pkgdir" }