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

pkgname='python-openfoodfacts'
pkgver=0.1.2
pkgrel=28
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"
}