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

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Sat Dec 24 17:53:39 UTC 2016


    Date: Saturday, December 24, 2016 @ 17:53:38
  Author: bpiotrowski
Revision: 201698

archrelease: copy trunk to community-staging-any

Added:
  python-pytest-mock/repos/community-staging-any/
  python-pytest-mock/repos/community-staging-any/PKGBUILD
    (from rev 201697, python-pytest-mock/trunk/PKGBUILD)

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

Copied: python-pytest-mock/repos/community-staging-any/PKGBUILD (from rev 201697, python-pytest-mock/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-12-24 17:53:38 UTC (rev 201698)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-mock
+pkgname=('python-pytest-mock' 'python2-pytest-mock')
+pkgver=1.5.0
+pkgrel=2
+pkgdesc="Thin-wrapper around the mock package for easier use with py.test"
+arch=('any')
+license=('LGPL3')
+url="https://github.com/pytest-dev/pytest-mock/"
+makedepends=('python-pytest' 'python2-pytest' 'python2-mock' 'git')
+source=("git+https://github.com/pytest-dev/pytest-mock.git#tag=v$pkgver")
+sha512sums=('SKIP')
+
+prepare() {
+  cp -a pytest-mock{,-py2}
+}
+
+build() {
+  cd "$srcdir"/pytest-mock
+  python setup.py build
+
+  cd "$srcdir"/pytest-mock-py2
+  python2 setup.py build
+}
+
+check() {
+  # Hack entry points by installing it
+
+  cd "$srcdir"/pytest-mock
+  python setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python3.6/site-packages:$PYTHONPATH:$PWD/tests" py.test
+
+  cd "$srcdir"/pytest-mock-py2
+  python2 setup.py install --root="$PWD/tmp_install" --optimize=1
+  PYTHONPATH="$PWD/tmp_install/usr/lib/python2.7/site-packages:$PYTHONPATH:$PWD/tests" py.test2
+}
+
+package_python-pytest-mock() {
+  depends=('python-pytest')
+
+  cd pytest-mock
+  python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-pytest-mock() {
+  depends=('python2-pytest' 'python2-mock')
+
+  cd pytest-mock-py2
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+}



More information about the arch-commits mailing list