# Maintainer: Luke Shumaker <lukeshu@sbcglobal.net>
# Maintainer (AUR): speps <speps@aur.archlinux.dot.org>

pkgname=weboob
pkgver=1.0
pkgrel=1
pkgdesc="A collection of applications to interact websites without a web browser."
arch=('any')
url="http://weboob.org/"
license=('AGPL3')

# This list is based on setup.py
# Supposedly python3 compatible, but tools/date.py throws a syntax error
_python=python2
depends=(
  $_python-pyqt4

  $_python-lxml
  $_python-feedparser
  $_python-requests
  $_python-dateutil
  $_python-yaml
  $_python-prettytable

  $_python-pillow
)
if [[ $_python == python2 ]]; then
  depends+=(
    python2-gdata # for Python < 3.0
    python2-mechanize # for Python < 3.0
    python2-futures # for Python < 3.2
  )
fi

makedepends=($_python-setuptools)
optdepends=('libyaml: for more performance'
            "$_python-simplejson: for more performance")
install="$pkgname.install"
source=("https://symlink.me/attachments/download/289/$pkgname-$pkgver.tar.gz")
md5sums=('38f832f1b8654441adafe8558faa7109')

package() {
  cd $pkgname-$pkgver
  $_python setup.py install --optimize=1 --root="$pkgdir" \
          --qt --xdg
}