[arch-commits] Commit in python-pytest-mock/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Sat Jun 30 09:00:56 UTC 2018
Date: Saturday, June 30, 2018 @ 09:00:56
Author: felixonmars
Revision: 347990
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 347989, python-pytest-mock/trunk/PKGBUILD)
----------+
PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)
Copied: python-pytest-mock/repos/community-staging-any/PKGBUILD (from rev 347989, python-pytest-mock/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-06-30 09:00:56 UTC (rev 347990)
@@ -0,0 +1,55 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-pytest-mock
+pkgname=('python-pytest-mock' 'python2-pytest-mock')
+pkgver=1.10.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' 'python-setuptools-scm'
+ 'python2-setuptools-scm')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/pytest-dev/pytest-mock/archive/v$pkgver.tar.gz")
+sha512sums=('bae9813cde3840eb783de98bc097b40276f2127907fd470a7242cb830a0c4a67ead9b6751471b76b5fd52e11e812501c65727dd1bfda0e0f829bf96c8a13550a')
+
+prepare() {
+ cp -a pytest-mock-$pkgver{,-py2}
+
+ export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+}
+
+build() {
+ cd "$srcdir"/pytest-mock-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/pytest-mock-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ # Hack entry points by installing it
+
+ cd "$srcdir"/pytest-mock-$pkgver
+ python setup.py install --root="$PWD/tmp_install" --optimize=1
+ PYTHONPATH="$PWD/tmp_install/usr/lib/python3.7/site-packages:$PYTHONPATH:$PWD/tests" py.test
+
+ cd "$srcdir"/pytest-mock-$pkgver-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-$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