1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Serge Victor <arch@random.re>
3 # Contributor: Kevin Azzam <aur@azz.am>
5 _pyname=flask-sqlalchemy
6 pkgname=python-flask-sqlalchemy
9 pkgdesc='Adds SQLAlchemy support to your Flask application'
10 url='http://flask-sqlalchemy.pocoo.org/'
13 depends=('python-flask' 'python-sqlalchemy')
14 makedepends=('python-setuptools' 'python-sphinx' 'python-pallets-sphinx-themes' 'python-sphinx-issues')
15 checkdepends=('python-pytest' 'python-blinker' 'python-mock')
16 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/mitsuhiko/flask-sqlalchemy/archive/${pkgver}.tar.gz
17 filter-warnings-test.patch)
18 sha512sums=('6780213b959bbc43306bad97ff6d3bf120baeff26cdaeba84b98b1b5b288a78fcbe80884e5342e8907bdfd2a7acd87aa0a8e761018bf8662b9509c1227b443cd'
19 '9cc30ac4650bbd54ee44d3ce9be985edf8c23e1747bd608167afdedde400b7556096d608985e56033867453e0c196193506ba89f298b241fed0a68bc7c593513')
22 sed -r "s|(release =)|\\1 '${pkgver}' #|" -i ${_pyname}-${pkgver}/docs/conf.py
23 cd ${_pyname}-${pkgver}
24 patch -Np1 -i ${srcdir}/filter-warnings-test.patch
28 cd ${_pyname}-${pkgver}
30 make -j1 -C docs man text SPHINXBUILD=sphinx-build PYTHONPATH=..
34 cd ${_pyname}-${pkgver}
35 PYTHONPATH=".:${PYTHONPATH}" py.test -vs -Wignore --disable-pytest-warnings
39 cd ${_pyname}-${pkgver}
40 python setup.py install --root="${pkgdir}" -O1 --skip-build
41 install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
42 install -Dm 644 CHANGES.rst README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
43 cp -r docs/_build/text "${pkgdir}/usr/share/doc/${pkgname}/text"
44 install -Dm 644 docs/_build/man/${_pyname}.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"