author | Felix Yan
<felixonmars@archlinux.org> 2014-03-30 17:13:53 UTC |
committer | Felix Yan
<felixonmars@archlinux.org> 2014-03-30 17:13:53 UTC |
parent | fb80e23dd8ce48f2bf32cec20abe1d4ea6c22904 |
PKGBUILD | +23 | -5 |
diff --git a/PKGBUILD b/PKGBUILD index efab416..b903ded 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -4,20 +4,38 @@ pkgbase=python-pytest pkgname=('python-pytest' 'python2-pytest') pkgver=2.5.2 -pkgrel=2 +pkgrel=3 pkgdesc="Simple powerful testing with Python" arch=('any') license=('MIT') url="http://pytest.org/" makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py') +checkdepends=('lsof' 'python-nose' 'python2-nose' 'twisted' 'python-mock' 'python2-mock' 'python-yaml' 'python2-yaml' 'python-pexpect' 'python2-pexpect') source=("http://pypi.python.org/packages/source/p/pytest/pytest-$pkgver.tar.gz") prepare() { - cp -r pytest-${pkgver} python2-pytest-${pkgver} + cp -r pytest-${pkgver}{,-py2} +} + +build() { + cd "$srcdir/pytest-${pkgver}" + python setup.py build + + cd "$srcdir/pytest-${pkgver}-py2" + python2 setup.py build +} + +check() { + cd "$srcdir/pytest-${pkgver}" + python setup.py test + + cd "$srcdir/pytest-${pkgver}-py2" + # Tests fail with 2.5.2: https://bitbucket.org/hpk42/pytest/issue/493/example-failure-in-pytests-own-testcase + #python2 setup.py test } package_python-pytest() { - depends=('python' 'python-py') + depends=('python' 'python-py' 'python-setuptools') cd pytest-${pkgver} python setup.py install --root="${pkgdir}" --optimize=1 @@ -25,9 +43,9 @@ package_python-pytest() { } package_python2-pytest() { - depends=('python2' 'python2-py') + depends=('python2' 'python2-py' 'python2-setuptools') - cd python2-pytest-${pkgver} + cd pytest-${pkgver}-py2 python2 setup.py install --root="${pkgdir}" --optimize=1 install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"