# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Simon Sapin <simon dot sapin at exyr dot org>
# Contributor: Kyle Keen <keenerd@gmail.com>

pkgname=python-flasgger
pkgver=0.9.7.1
pkgrel=3
pkgdesc="Extract swagger specs from your flask project"
url="https://github.com/flasgger/flasgger"
license=('MIT')
arch=(any)
depends=('python-flask' 'python-yaml' 'python-jsonschema' 'python-mistune' 'python-six')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-flex' 'python-marshmallow' 'python-decorator'
              'python-apispec-webframeworks' 'python-flask-restful')
source=("$pkgname-$pkgver.tar.gz::https://github.com/flasgger/flasgger/archive/v$pkgver.tar.gz")
sha512sums=('60aaadccd291147f1eb1ac589965e7b31f02d9b96686fad4d906d6b09d8d9817671aefe1672d84bfd1d149c56b2247342f91b189b5e474a341da0fb449dbe938')

build() {
  cd flasgger-$pkgver
  python setup.py build
}

check() {
  cd flasgger-$pkgver
  PYTHONPATH="$PWD/etc/flasgger_package" python -m pytest tests
}

package() {
  cd flasgger-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
