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

Felix Yan felixonmars at archlinux.org
Tue Dec 27 08:22:01 UTC 2016


    Date: Tuesday, December 27, 2016 @ 08:22:00
  Author: felixonmars
Revision: 203022

archrelease: copy trunk to community-staging-any

Added:
  python-prawcore/repos/community-staging-any/
  python-prawcore/repos/community-staging-any/PKGBUILD
    (from rev 203021, python-prawcore/trunk/PKGBUILD)

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

Copied: python-prawcore/repos/community-staging-any/PKGBUILD (from rev 203021, python-prawcore/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-12-27 08:22:00 UTC (rev 203022)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+
+pkgbase=python-prawcore
+pkgname=('python-prawcore' 'python2-prawcore')
+pkgver=0.6.0
+pkgrel=1
+pkgdesc="Low-level communication layer for PRAW 4+."
+arch=('any')
+license=('BSD')
+url="https://github.com/praw-dev/prawcore"
+makedepends=('python-setuptools' 'python2-setuptools' 'python-requests' 'python2-requests' 'git')
+checkdepends=('python-mock' 'python2-mock' 'python-betamax-matchers' 'python2-betamax-matchers'
+              'python-betamax-serializers' 'python2-betamax-serializers')
+source=("git+https://github.com/praw-dev/prawcore.git#tag=v$pkgver")
+md5sums=('SKIP')
+
+prepare() {
+  sed -i 's/mock ==1.0.1/mock/' prawcore/setup.py
+  cp -a prawcore{,-py2}
+}
+
+check() {
+  # https://github.com/praw-dev/prawcore/issues/53
+  cd "$srcdir"/prawcore
+  python setup.py test || warning "Tests failed"
+
+  cd "$srcdir"/prawcore-py2
+  python2 setup.py test || warning "Tests failed"
+}
+
+package_python-prawcore() {
+  depends=('python-requests')
+
+  cd prawcore
+  python setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}
+
+package_python2-prawcore() {
+  depends=('python2-requests')
+
+  cd prawcore-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+  install -Dm644 LICENSE.txt "$pkgdir"/usr/share/licenses/$pkgname/LICENSE.txt
+}



More information about the arch-commits mailing list