mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-01-24 02:22:13 +08:00
59 lines
1.8 KiB
Bash
59 lines
1.8 KiB
Bash
# Contributor: Felix Yan <felixonmars@archlinux.org>
|
|
|
|
pkgbase=python-pytest-cache
|
|
pkgname=('python3-pytest-cache' 'python2-pytest-cache')
|
|
_pypiname=pytest-cache
|
|
pkgver=1.0
|
|
pkgrel=3
|
|
pkgdesc='pytest plugin with mechanisms for caching across test runs'
|
|
arch=('any')
|
|
license=('MIT')
|
|
url='http://bitbucket.org/hpk42/pytest-cache/'
|
|
makedepends=('python3-pytest' 'python2-pytest' 'python3-execnet' 'python2-execnet' 'mercurial')
|
|
source=("hg+https://bitbucket.org/hpk42/pytest-cache#tag=$pkgver")
|
|
md5sums=('SKIP')
|
|
|
|
prepare() {
|
|
cp -a "${srcdir}/${_pypiname}"{,-py2}
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir/$_pypiname"
|
|
python3 setup.py build
|
|
|
|
cd "$srcdir/$_pypiname-py2"
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {(
|
|
# Hack entry points by installing it
|
|
|
|
cd "$srcdir/$_pypiname"
|
|
python3 setup.py install --root="$PWD/tmp_install" --optimize=1
|
|
PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH" py.test
|
|
|
|
cd "$srcdir/$_pypiname-py2"
|
|
python2 setup.py install --root="$PWD/tmp_install" --optimize=1
|
|
PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH" py.test2
|
|
) || warning "Tests failed"
|
|
# Skipping tests as it's incompatibility with pytest 2.8.0, not python 3.5.
|
|
# https://bitbucket.org/hpk42/pytest-cache/issues/11/tests-failed-with-pytest-280
|
|
}
|
|
|
|
package_python3-pytest-cache() {
|
|
depends=('python3-pytest' 'python3-execnet')
|
|
|
|
cd "$srcdir/$_pypiname"
|
|
python3 setup.py install --root="$pkgdir"/ --optimize=1
|
|
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|
|
|
|
package_python2-pytest-cache() {
|
|
depends=('python2-pytest' 'python2-execnet')
|
|
|
|
cd "$srcdir/$_pypiname-py2"
|
|
python2 setup.py install --root="$pkgdir"/ --optimize=1
|
|
install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
}
|
|
# vim:set ts=2 sw=2 et:
|