archrelease: copy trunk to community-any
[arch-community.git] / python-pytest-tap / repos / community-any / PKGBUILD
blobedc58ece87ac41eea2610694e5953b0b52fda12b
1 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
3 pkgname=python-pytest-tap
4 _pyname=${pkgname#python-}
5 pkgver=3.3
6 pkgrel=2
7 pkgdesc="Test Anything Protocol (TAP) reporting plugin for pytest."
8 arch=(any)
9 url="https://github.com/python-tap/pytest-tap"
10 license=('BSD')
11 depends=('python-pytest' 'python-tappy')
12 makedepends=('python-setuptools')
13 source=(${pkgname}-${pkgver}.tar.gz::https://github.com/python-tap/pytest-tap/archive/v${pkgver}.tar.gz
14         https://github.com/python-tap/pytest-tap/commit/4ed0138b.patch)
15 sha256sums=('6f3f7895e005c19391be46dc592182d52c9368fe7c4a5bec292ba4632314ff42'
16             '459d4040ecaa5a088330c99800695c3e688b22bda6fd6b4aa8a30da85012085f')
18 prepare() {
19   patch -d $_pyname-$pkgver -p1 < 4ed0138b.patch # Fix tests
22 build() {
23         cd "${srcdir}/${_pyname}-${pkgver}"
24         python setup.py build
27 check() {
28         cd "${srcdir}/${_pyname}-${pkgver}"
29         local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
30         python setup.py install --root="${srcdir}/tmp_install" --optimize=1
31         PYTHONPATH="${srcdir}/tmp_install/usr/lib/python${python_version}/site-packages" pytest
34 package() {
35         cd "${srcdir}/${_pyname}-${pkgver}"
36         python setup.py install --root="${pkgdir}" --prefix=/usr --optimize=1