blob: 3aa7fe235ec960762cf9bec491d9789b803f8d03 (
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
41
42
|
# Maintainer: Erich Eckner <arch at eckner dot net>
pkgname='python-openfoodfacts'
pkgver=0.1.3
pkgrel=13
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=('8b7e274ec435cd8d8839591ffbb078a3a0a8c8a7d57db9bfce1fe9360f9b4a5095a7f8373208ccbf4738e7e54b51f48a0791fdc2906b8539594ea6e1d05eca7f')
depends=(
'python>=3.13'
'python<3.14')
makedepends=(
'python-build'
'python-installer'
'python-setuptools'
'python-wheel'
)
checkdepends=(
'python-pip'
'python-pytest'
'python-requests-mock>=1.8.0'
'python-wheel')
build() {
cd "${srcdir}/${_pkgname}-python-${pkgver}"
python -m build --wheel --no-isolation
}
check() {
cd "${srcdir}/${_pkgname}-python-${pkgver}"
python -m installer --destdir=test_dir dist/*.whl
pytest -vv
}
package() {
cd "${srcdir}/${_pkgname}-python-${pkgver}"
python -m installer --destdir="$pkgdir" dist/*.whl
}
|