summaryrefslogtreecommitdiff
path: root/python-openfoodfacts/PKGBUILD
blob: 91d97aa7779fac4de69dc1fd7d1eff1ea03bfce9 (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=1
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.10'
  'python<3.11')
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"
}