[arch-commits] Commit in python-betamax/repos (2 files)
Felix Yan
felixonmars at archlinux.org
Mon Jul 2 10:22:31 UTC 2018
Date: Monday, July 2, 2018 @ 10:22:31
Author: felixonmars
Revision: 349480
archrelease: copy trunk to community-staging-any
Added:
python-betamax/repos/community-staging-any/
python-betamax/repos/community-staging-any/PKGBUILD
(from rev 349479, python-betamax/trunk/PKGBUILD)
----------+
PKGBUILD | 43 +++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
Copied: python-betamax/repos/community-staging-any/PKGBUILD (from rev 349479, python-betamax/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2018-07-02 10:22:31 UTC (rev 349480)
@@ -0,0 +1,43 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-betamax
+pkgname=('python-betamax' 'python2-betamax')
+pkgver=0.8.1
+pkgrel=2
+pkgdesc="A VCR imitation for python-requests"
+arch=('any')
+license=('GPL')
+url='https://github.com/sigmavirus24/betamax'
+makedepends=('python-setuptools' 'python2-setuptools' 'python-requests' 'python2-requests')
+checkdepends=('python-pytest-runner' 'python2-pytest-runner' 'python2-mock')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/sigmavirus24/betamax/archive/$pkgver.tar.gz")
+sha512sums=('3888aa5f1e249faf496a32c03fb7d37096d7bbde573048c2ff3d1ba0fa03ebaeb4ff4e72191478da5f1a04d813204e31d3897469bd5f5eea4c5db2c72aae1374')
+
+prepare() {
+ cp -a betamax-$pkgver{,-py2}
+}
+
+check() {
+ cd "$srcdir"/betamax-$pkgver
+ python setup.py pytest
+
+ cd "$srcdir"/betamax-$pkgver-py2
+ python2 setup.py pytest
+}
+
+package_python-betamax() {
+ depends=('python-requests')
+
+ cd betamax-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-betamax() {
+ depends=('python2-requests')
+
+ cd betamax-$pkgver-py2
+ python2 setup.py install --root="$pkgdir" --optimize=1
+ install -D -m644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
More information about the arch-commits
mailing list