upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / python-flask-wtf / trunk / PKGBUILD
blob419023cb778e3282bad9f1a37271306130fc87b8
1 # Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
2 # Contributor: Serge Victor <arch@random.re>
4 _pyname=flask-wtf
5 pkgname=python-flask-wtf
6 pkgver=1.1.1
7 pkgrel=2
8 pkgdesc='Simple integration of Flask and WTForms'
9 url='https://flask-wtf.readthedocs.io/'
10 arch=('any')
11 license=('BSD')
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')
20 prepare() {
21   cd ${_pyname}-${pkgver}
22   sed -i "s/^release, version =/& '${pkgver}', '${pkgver%.*}.x' #/" docs/conf.py
25 build() {
26   cd ${_pyname}-${pkgver}
27   make -C docs man text SPHINXBUILD=sphinx-build
30 check() {
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}
36 package() {
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"
45 # vim: ts=2 sw=2 et: