[arch-commits] Commit in python-requests-mock/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Thu Jul 12 20:50:59 UTC 2018
Date: Thursday, July 12, 2018 @ 20:50:58
Author: felixonmars
Revision: 358207
archrelease: copy trunk to community-staging-any
Added:
python-requests-mock/repos/community-staging-any/
python-requests-mock/repos/community-staging-any/PKGBUILD
(from rev 358206, python-requests-mock/trunk/PKGBUILD)
----------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
Copied: python-requests-mock/repos/community-staging-any/PKGBUILD (from rev 358206, python-requests-mock/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-12 20:50:58 UTC (rev 358207)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-requests-mock
+pkgname=('python-requests-mock' 'python2-requests-mock')
+pkgver=1.5.0
+pkgrel=2
+pkgdesc="A mock of useful classes and functions to be used with python-requests."
+arch=('any')
+url="https://github.com/jamielennox/requests-mock"
+license=('Apache')
+makedepends=('python-pbr' 'python2-pbr' 'python-requests' 'python2-requests' 'python-six'
+ 'python2-six')
+checkdepends=('python-testrepository' 'python2-testrepository' 'python-mock' 'python2-mock')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/jamielennox/requests-mock/archive/$pkgver.tar.gz")
+sha512sums=('d37de8ed65f316b40b520f7d87c15711ec0ae04484695010a04c3c4c7877031c19ae6bb3e71f1d554857e6c7915af770701609634e2404ed1a9909750c3041d1')
+
+prepare() {
+ cp -a requests-mock-$pkgver{,-py2}
+
+ export PBR_VERSION=$pkgver
+}
+
+build() {
+ cd "$srcdir"/requests-mock-$pkgver
+ python setup.py build
+
+ cd "$srcdir"/requests-mock-$pkgver-py2
+ python2 setup.py build
+}
+
+check() {
+ cd "$srcdir"/requests-mock-$pkgver
+ python setup.py testr
+
+ cd "$srcdir"/requests-mock-$pkgver-py2
+ PYTHON=python2 python2 setup.py testr
+}
+
+package_python-requests-mock() {
+ depends=('python-requests' 'python-six')
+
+ cd requests-mock-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-requests-mock() {
+ depends=('python2-requests' 'python2-six')
+
+ cd requests-mock-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+}
More information about the arch-commits
mailing list