summaryrefslogtreecommitdiff
path: root/python-openfoodfacts/PKGBUILD
blob: 3528f559de5a903825c5ac0ea100cb0e7b5ad2e2 (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
# Maintainer: Erich Eckner <arch at eckner dot net>

pkgname='python-openfoodfacts'
pkgver=0.1.3
pkgrel=6
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.12'
  'python<3.13')
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"
}