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

Felix Yan felixonmars at archlinux.org
Fri Oct 25 19:55:41 UTC 2019


    Date: Friday, October 25, 2019 @ 19:55:40
  Author: felixonmars
Revision: 519628

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 519627, python-requests-mock/trunk/PKGBUILD)

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

Copied: python-requests-mock/repos/community-staging-any/PKGBUILD (from rev 519627, python-requests-mock/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2019-10-25 19:55:40 UTC (rev 519628)
@@ -0,0 +1,52 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-requests-mock
+pkgname=('python-requests-mock' 'python2-requests-mock')
+pkgver=1.7.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'
+              'python-purl' 'python2-purl')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/jamielennox/requests-mock/archive/$pkgver.tar.gz")
+sha512sums=('a5a2ccc6d23fd47f6b85b7b27c20dbdff303452bc34eef78f2b3316d020cdd21631d840fe798cb721aa1ddedc830b0284a8c042c9d18142513dc61bda1207cab')
+
+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