From ac1fafe3b053fc14f81f6ca0a11522c13d19fb18 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Fri, 23 Mar 2018 20:33:00 +0000
Subject: python-pytest: dep of python-pillow

---
 abs/core/python_modules/python-pytest/PKGBUILD    | 63 +++++++++++++----------
 abs/core/python_modules/python-pytest/__changelog |  1 -
 2 files changed, 35 insertions(+), 29 deletions(-)
 delete mode 100644 abs/core/python_modules/python-pytest/__changelog

diff --git a/abs/core/python_modules/python-pytest/PKGBUILD b/abs/core/python_modules/python-pytest/PKGBUILD
index d8db835..0a9faed 100644
--- a/abs/core/python_modules/python-pytest/PKGBUILD
+++ b/abs/core/python_modules/python-pytest/PKGBUILD
@@ -1,56 +1,63 @@
 # $Id$
-# Maintainer: Felix Yan <felixonmars@gmail.com>
+# Maintainer: Felix Yan <felixonmars@archlinux.org>
 # Contributor: Felix Kaiser <felix.kaiser@fxkr.net>
 
 pkgbase=python-pytest
-pkgname=('python2-pytest')
-pkgver=2.5.2
-pkgrel=3
+pkgname=('python-pytest' 'python2-pytest')
+pkgver=3.5.0
+pkgrel=1
 pkgdesc="Simple powerful testing with Python"
 arch=('any')
 license=('MIT')
 url="http://pytest.org/"
-makedepends=('python2-setuptools' 'python2-py')
-checkdepends=('lsof' 'python2-nose' 'twisted' 'python2-mock' 'python2-yaml' 'python2-pexpect')
-source=("http://pypi.python.org/packages/source/p/pytest/pytest-$pkgver.tar.gz")
+makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py' 'python-pluggy'
+             'python2-pluggy' 'python-attrs' 'python2-attrs' 'python-more-itertools'
+             'python2-more-itertools' 'python2-funcsigs')
+checkdepends=('lsof' 'python-nose' 'python2-nose' 'python-mock' 'python2-mock' 'python-tox'
+              'python2-tox' 'python-yaml' 'python2-yaml' 'python-pytest-xdist'
+              'python2-pytest-xdist' 'python-twisted' 'python2-twisted' 'python-requests'
+              'python2-requests' 'python-hypothesis' 'python2-hypothesis')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest/archive/$pkgver.tar.gz")
+sha512sums=('3e67f411b45f0cce6921d65926b3c6b7bcf6169a8e96eb8f74465d795a49d690c7027db3cb3147868ce238d5b416a6e87de27728598e4a526bf6bbb7a5506913')
 
 prepare() {
-  cp -r pytest-${pkgver}{,-py2}
+  cp -a pytest-$pkgver{,-py2}
+
+  export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
 }
 
 build() {
-#  cd "$srcdir/pytest-${pkgver}"
-#  python setup.py build
+  cd "$srcdir"/pytest-$pkgver
+  python setup.py build
 
-  cd "$srcdir/pytest-${pkgver}-py2"
+  cd "$srcdir"/pytest-$pkgver-py2
   python2 setup.py build
 }
 
 check() {
-#  cd "$srcdir/pytest-${pkgver}"
-#  python setup.py test
+  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
+  cd "$srcdir"/pytest-$pkgver-py2
   python2 setup.py test
 }
 
-#package_python-pytest() {
-#  depends=('python' 'python-py' 'python-setuptools')
+package_python-pytest() {
+  depends=('python-py' 'python-setuptools' 'python-pluggy' 'python-attrs' 'python-more-itertools')
 
-#  cd pytest-${pkgver}
-#  python setup.py install --root="${pkgdir}" --optimize=1
-#  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-#}
+  cd pytest-$pkgver
+  python 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')
+  depends=('python2-py' 'python2-setuptools' 'python2-pluggy' 'python2-attrs'
+           'python2-more-itertools' 'python2-funcsigs')
 
-  cd pytest-${pkgver}-py2
-  python2 setup.py install --root="${pkgdir}" --optimize=1
-  install -D -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+  cd pytest-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
 
-  mv "${pkgdir}/usr/bin/py.test" "${pkgdir}/usr/bin/py.test2"
+  mv "$pkgdir"/usr/bin/py.test{,2}
+  mv "$pkgdir"/usr/bin/pytest{,2}
 }
-
-sha512sums=('d291f229f4c0a2132c437dde6ca04bf87701fe270c2fa314104badad9221ab866251890c66387d23fefd3ab1f928ee3b290dac21e3d62e7660af8903e85a2f36')
diff --git a/abs/core/python_modules/python-pytest/__changelog b/abs/core/python_modules/python-pytest/__changelog
deleted file mode 100644
index 488d3cf..0000000
--- a/abs/core/python_modules/python-pytest/__changelog
+++ /dev/null
@@ -1 +0,0 @@
-PKGBUILD: rm py 3 stuff
-- 
cgit v0.12

