# Maintainer: UtG # Contributor: aur2ccr (http://ddg.gg/?q=!ccr+aur2ccr) # Contributor: Felix Kaiser pkgbase=python-pytest pkgname=('python2-pytest' 'python3-pytest') pkgver=2.6.2 pkgrel=1 pkgdesc="Simple powerful testing with Python" arch=('any') license=('MIT') url="http://pytest.org/" makedepends=('python2-setuptools' 'python3-setuptools' 'python2-py' 'python3-py') checkdepends=('lsof' 'python3-nose' 'python2-nose' 'python3-twisted' 'python2-twisted' 'python3-mock' 'python2-mock' 'python3-yaml' 'python2-yaml' 'python3-pexpect' 'python2-pexpect') source=("http://pypi.python.org/packages/source/p/pytest/pytest-$pkgver.tar.gz") md5sums=('0a1735fb1d481ef3864f34678607ba85') prepare() { cp -r pytest-${pkgver}{,-py3} cp -r pytest-${pkgver}{,-py2} } build() { cd "$srcdir/pytest-${pkgver}-py3" python3 setup.py build cd "$srcdir/pytest-${pkgver}-py2" python2 setup.py build } check() { cd "$srcdir/pytest-${pkgver}-py3" python3 setup.py test cd "$srcdir/pytest-${pkgver}-py2" python2 setup.py test } package_python3-pytest() { depends=('python3' 'python3-py' 'python3-setuptools') cd pytest-${pkgver}-py3 python3 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" } package_python2-pytest() { depends=('python2' 'python2-py' 'python2-setuptools') provides=('python-pytest' 'python2-pytest') conflicts=('python-pytest') replaces=('python-pytest') cd pytest-${pkgver}-py2 python2 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" # deal with the conflict with python-pytests version of /usr/bin/py.test mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2" }