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

Felix Yan fyan at archlinux.org
Fri May 8 06:44:43 UTC 2015


    Date: Friday, May 8, 2015 @ 08:44:42
  Author: fyan
Revision: 132939

archrelease: copy trunk to community-any

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

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

Copied: python-pytest-mock/repos/community-any/PKGBUILD (from rev 132938, python-pytest-mock/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2015-05-08 06:44:42 UTC (rev 132939)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-mock
+pkgname=('python-pytest-mock' 'python2-pytest-mock')
+pkgver=0.5.0
+pkgrel=1
+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')
+#checkdepends=('python-coverage' 'python2-coverage')
+source=("http://pypi.python.org/packages/source/p/pytest-mock/pytest-mock-$pkgver.zip")
+sha512sums=('46a51b711fc29667c81e907809d2b1ddbd1f39c50dd3cfff3f05ed8cfed7e65eb078cf2ca68195955a3eb551d13f564475edbe37da5887980a0850b7ce6116a1')
+
+prepare() {
+  cp -a pytest-mock-${pkgver}{,-py2}
+}
+
+build() {
+  cd "$srcdir/pytest-mock-${pkgver}"
+  python setup.py build
+
+  cd "$srcdir/pytest-mock-${pkgver}-py2"
+  python2 setup.py build
+}
+
+check() {
+  # Tests not included
+
+  cd "$srcdir/pytest-mock-${pkgver}"
+  # coverage3 run --source=pytest_mock.py runtests.py
+
+  cd "$srcdir/pytest-mock-${pkgver}-py2"
+  # coverage2 run --source=pytest_mock.py runtests.py
+}
+
+package_python-pytest-mock() {
+  depends=('python-pytest')
+
+  cd pytest-mock-${pkgver}
+  python setup.py install --root="${pkgdir}" --optimize=1
+}
+
+package_python2-pytest-mock() {
+  depends=('python2-pytest' 'python2-mock')
+
+  cd pytest-mock-${pkgver}-py2
+  python2 setup.py install --root="${pkgdir}" --optimize=1
+}
+



More information about the arch-commits mailing list