[arch-commits] Commit in python-pytest-mock/repos (2 files)
Felix Yan
fyan at archlinux.org
Sat Sep 19 11:20:05 UTC 2015
Date: Saturday, September 19, 2015 @ 13:20:04
Author: fyan
Revision: 140754
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 140753, python-pytest-mock/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: python-pytest-mock/repos/community-staging-any/PKGBUILD (from rev 140753, python-pytest-mock/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2015-09-19 11:20:04 UTC (rev 140754)
@@ -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.7.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')
+#checkdepends=('python-coverage' 'python2-coverage')
+source=("http://pypi.python.org/packages/source/p/pytest-mock/pytest-mock-$pkgver.zip")
+sha512sums=('249e1ded30199e1ea2c87ef4c17295a28c537ad4fb183289383e771ab26378499c11873df97a7a6214c0fca52b6aa5d160aa68de160dca56d4e78add10f2f5c8')
+
+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