1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Serge Victor <arch@random.re>
5 pkgname=python-flask-wtf
8 pkgdesc='Simple integration of Flask and WTForms'
9 url='https://flask-wtf.readthedocs.io/'
12 depends=('python-flask' 'python-wtforms' 'python-werkzeug' 'python-flask-babel')
13 makedepends=('python-setuptools' 'python-sphinx' 'python-pallets-sphinx-themes'
14 'python-sphinxcontrib-log-cabinet' 'python-sphinx-issues')
15 checkdepends=('python-tox')
16 options=('!makeflags')
17 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/wtforms/flask-wtf/archive/v${pkgver}.tar.gz)
18 sha512sums=('4e893ac29051d7c0793f47b8d046b2402902d832a4164408221369d65c170c5c6a16b0d2c7d78e166e82e7fc665118df8c3f1ee51503afaabc053ba236c1f178')
21 cd ${_pyname}-${pkgver}
22 sed -i "s/^release, version =/& '${pkgver}', '${pkgver%.*}.x' #/" docs/conf.py
26 cd ${_pyname}-${pkgver}
27 make -C docs man text SPHINXBUILD=sphinx-build
31 cd ${_pyname}-${pkgver}
32 local python_version=$(python -c 'import sys; print("".join(map(str, sys.version_info[:2])))')
33 tox -e py${python_version}
37 cd ${_pyname}-${pkgver}
38 python setup.py install --root="${pkgdir}" -O1
39 install -Dm 644 LICENSE.rst -t "${pkgdir}/usr/share/licenses/${pkgname}"
40 install -Dm 644 README.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
41 cp -r docs/_build/text "${pkgdir}/usr/share/doc/${pkgname}/text"
42 install -Dm 644 docs/_build/man/flask-wtf.1 "${pkgdir}/usr/share/man/man1/${pkgname}.1"