archrelease: copy trunk to community-any
[ArchLinux/community.git] / python-pecan / trunk / PKGBUILD
blob71651d5b4e9945e8adeba15e5d76fdbec6b0da39
1 # Maintainer: Thore Bödecker <foxxx0@archlinux.org>
2 # Contributor: Tim Meusel <tim@bastelfreak.de>
3 pkgname="python-pecan"
4 _pkgname="${pkgname#python-}"
5 pkgdesc='A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies.'
6 pkgver=1.4.2
7 pkgrel=3
8 arch=('any')
9 url='https://github.com/pecan/pecan'
10 license=('BSD')
11 depends=('python' 'python-webob' 'python-mako' 'python-webtest' 'python-six'
12          'python-logutils')
13 makedepends=('python' 'python-setuptools' 'python-sphinx' 'python-webob'
14              'python-mako' 'python-webtest' 'python-six' 'python-logutils')
15 checkdepends=('python-virtualenv' 'python-jinja' 'gunicorn'
16               'python-sqlalchemy' 'python-genshi' 'python-nine' 'uwsgi'
17               'python-pytest' 'python-kajiki')
18 source=("${pkgname}-${pkgver}.tar.gz::https://github.com/${_pkgname}/${_pkgname}/archive/${pkgver}.tar.gz")
19 sha512sums=('2080ba74fc75c458b927b28cbddbe1135da05fd0eff095942823cf43a6d7b03f438a12b46ba007cf45a128628078f3a404842ac2dced86c270b1a1e385feb83b')
21 prepare(){
22   cd "${srcdir}/${_pkgname}-${pkgver}"
23   # fix manpage build
24   sed -i '/^dist = /d' docs/source/conf.py
25   sed -i "s/^version = release = .*\$/version = release = '${pkgver}'/" docs/source/conf.py
28 build() {
29   cd "${srcdir}/${_pkgname}-${pkgver}"
30   python ./setup.py build
33 check() {
34   cd "${srcdir}/${_pkgname}-${pkgver}"
35   py.test -vvv -s -ra --showlocals --noconftest pecan/tests/
38 package() {
39   cd "${srcdir}/${_pkgname}-${pkgver}"
40   python ./setup.py install --root="$pkgdir/" --optimize=1
41   install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
43   cd docs
44   PYTHONPATH="${PWD}/../" make man
45   install -D -m644 "./build/man/pecan.1" "${pkgdir}/usr/share/man/man1/${pkgname}.1"