[arch-commits] Commit in python-pytest/repos (2 files)

Felix Yan felixonmars at archlinux.org
Fri Feb 2 14:30:20 UTC 2018


    Date: Friday, February 2, 2018 @ 14:30:19
  Author: felixonmars
Revision: 288581

archrelease: copy trunk to community-testing-any

Added:
  python-pytest/repos/community-testing-any/
  python-pytest/repos/community-testing-any/PKGBUILD
    (from rev 288580, python-pytest/trunk/PKGBUILD)

----------+
 PKGBUILD |   63 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)

Copied: python-pytest/repos/community-testing-any/PKGBUILD (from rev 288580, python-pytest/trunk/PKGBUILD)
===================================================================
--- community-testing-any/PKGBUILD	                        (rev 0)
+++ community-testing-any/PKGBUILD	2018-02-02 14:30:19 UTC (rev 288581)
@@ -0,0 +1,63 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Felix Kaiser <felix.kaiser at fxkr.net>
+
+pkgbase=python-pytest
+pkgname=('python-pytest' 'python2-pytest')
+pkgver=3.4.0
+pkgrel=1
+pkgdesc="Simple powerful testing with Python"
+arch=('any')
+license=('MIT')
+url="http://pytest.org/"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-py' 'python2-py' 'python-pluggy'
+             'python2-pluggy' 'python-attrs' 'python2-attrs' '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=('a0c6770915efc19fa1190e49219115af0b42aea0320309ba723fee0ebf020b91d1af809b71ecd0c489f45cfca5fabe97d344c1be52dc567f75e4306a8bd77606')
+
+prepare() {
+  cp -a pytest-$pkgver{,-py2}
+
+  export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+}
+
+build() {
+  cd "$srcdir"/pytest-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/pytest-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  # Expected failure due to xdist, also present on official travis
+
+  cd "$srcdir"/pytest-$pkgver
+  python setup.py test || warning "Tests failed"
+
+  cd "$srcdir"/pytest-$pkgver-py2
+  python2 setup.py test || warning "Tests failed"
+}
+
+package_python-pytest() {
+  depends=('python-py' 'python-setuptools' 'python-pluggy' 'python-attrs')
+
+  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-py' 'python2-setuptools' 'python2-pluggy' 'python2-attrs' 'python2-funcsigs')
+
+  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{,2}
+  mv "$pkgdir"/usr/bin/pytest{,2}
+}



More information about the arch-commits mailing list