# Maintainer: Bruno Pagani <archange@archlinux.org>

pkgname=woob
pkgver=3.0
pkgrel=2
pkgdesc="Core library and modules for Web outside of Browsers"
arch=(any)
url="https://woob.tech/"
license=(LGPL3)
depends=(
    python-lxml
    python-cssselect
    python-requests
    python-dateutil
    python-yaml
    python-html2text
    python-six
    python-unidecode
    python-pillow
    python-babel
    python-simplejson
)
optdepends=(
    'python-prettytable: CLI output formatting'
    'python-feedparser: required by some modules'
)
makedepends=(python-setuptools)
replaces=(weboob)
provides=(weboob)
conflicts=(weboob)
source=(https://files.pythonhosted.org/packages/source/w/${pkgname}/${pkgname}-${pkgver}.tar.gz)
sha256sums=('47864df4906b44a659abe59630c0e28a1aa24ffbc3c90e22454b58f88bef1726')

build() {
  cd ${pkgname}-${pkgver}
  export PYTHONHASHSEED=0
  python setup.py build
}

package() {
  cd ${pkgname}-${pkgver}
  python setup.py install --prefix=/usr --root="${pkgdir}" --skip-build --optimize=1
}
