mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
50 lines
1.8 KiB
Bash
50 lines
1.8 KiB
Bash
# Maintainer: Felix Yan <felixonmars@archlinux.org>
|
|
# Contributor: Felix Kaiser <felix.kaiser@fxkr.net>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - python2 variant since it's missing upstream and still a dep
|
|
|
|
pkgname=python2-pytest
|
|
pkgver=4.6.4
|
|
pkgrel=1
|
|
pkgdesc="Simple powerful testing with Python"
|
|
arch=('any')
|
|
license=('MIT')
|
|
url="http://pytest.org/"
|
|
makedepends=('python2-setuptools-scm' 'python2-py' 'python2-pluggy' 'python2-attrs'
|
|
'python2-more-itertools' 'python2-atomicwrites' 'python2-funcsigs'
|
|
'python2-pathlib2' 'python2-wcwidth')
|
|
checkdepends=('lsof' 'python2-nose' 'python2-mock' 'python2-tox' 'python2-yaml'
|
|
'python2-pytest-xdist' 'python2-twisted' 'python2-requests' 'python2-hypothesis')
|
|
source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz")
|
|
sha512sums=('58eed6f9e367b23944805eb10f1d727e95a8e42f65fbef673b890656a6395746aee5d0891a0849d2bfa5bb46fafda6120bb1d0b532b0d95586bb196942395dd0')
|
|
|
|
prepare() {
|
|
sed -i 's/==0/>=0/' pytest-$pkgver/setup.py
|
|
|
|
export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
|
|
}
|
|
|
|
build() {
|
|
cd "$srcdir"/pytest-$pkgver
|
|
python2 setup.py build
|
|
}
|
|
|
|
check() {
|
|
# Skip test_collect_pyargs_with_testpaths because it mangles PYTHONPATH
|
|
|
|
cd "$srcdir"/pytest-$pkgver
|
|
PYTHONPATH="$PWD"/build/lib python2 src/pytest.py -k 'not test_collect_pyargs_with_testpaths'
|
|
}
|
|
|
|
package() {
|
|
depends=('python2-py' 'python2-setuptools' 'python2-pluggy' 'python2-attrs' 'python2-wcwidth'
|
|
'python2-more-itertools' 'python2-atomicwrites' 'python2-funcsigs' 'python2-pathlib2')
|
|
|
|
cd pytest-$pkgver
|
|
python2 setup.py install --root="$pkgdir" --optimize=1
|
|
install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
|
|
|
|
mv "$pkgdir"/usr/bin/py.test{,2}
|
|
mv "$pkgdir"/usr/bin/pytest{,2}
|
|
}
|