From a7ce28ceaf2f772166f9d9dea552919a3b363cf7 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 16 Nov 2019 04:39:02 +0000 Subject: [PATCH] added community/python2-pytest --- community/python2-pytest/PKGBUILD | 50 +++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 community/python2-pytest/PKGBUILD diff --git a/community/python2-pytest/PKGBUILD b/community/python2-pytest/PKGBUILD new file mode 100644 index 000000000..03db5b894 --- /dev/null +++ b/community/python2-pytest/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: Felix Yan +# Contributor: Felix Kaiser + +# ALARM: Kevin Mihelich +# - 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} +}