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

Felix Yan fyan at archlinux.org
Tue Nov 11 08:17:09 UTC 2014


    Date: Tuesday, November 11, 2014 @ 09:17:09
  Author: fyan
Revision: 122345

archrelease: copy trunk to community-any

Added:
  python-requests-toolbelt/repos/community-any/
  python-requests-toolbelt/repos/community-any/PKGBUILD
    (from rev 122344, python-requests-toolbelt/trunk/PKGBUILD)

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

Copied: python-requests-toolbelt/repos/community-any/PKGBUILD (from rev 122344, python-requests-toolbelt/trunk/PKGBUILD)
===================================================================
--- community-any/PKGBUILD	                        (rev 0)
+++ community-any/PKGBUILD	2014-11-11 08:17:09 UTC (rev 122345)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: eolianoe <eolianoe At GoogleMAIL DoT com>
+
+pkgbase=python-requests-toolbelt
+pkgname=('python-requests-toolbelt' 'python2-requests-toolbelt')
+_pkgname=requests-toolbelt
+pkgver=0.3.1
+pkgrel=2
+pkgdesc="A toolbelt of useful classes and functions to be used with python-requests."
+arch=('any')
+url="https://github.com/sigmavirus24/requests-toolbelt"
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-requests' 'python2-requests')
+checkdepends=('python-pytest' 'python2-pytest')
+source=("https://pypi.python.org/packages/source/r/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
+md5sums=('e563377e46cd0be8c7b3ac144a65844c')
+
+prepare() {
+  cp -a ${_pkgname}-$pkgver{,-py2}
+}
+
+build() {
+  cd "$srcdir/${_pkgname}-$pkgver"
+  python setup.py build
+
+  cd "$srcdir/${_pkgname}-$pkgver-py2"
+  python2 setup.py build
+}
+
+check() {
+  # Tests not included
+  cd "$srcdir/${_pkgname}-$pkgver"
+  py.test
+
+  cd "$srcdir/${_pkgname}-$pkgver-py2"
+  py.test2
+}
+
+package_python-requests-toolbelt() {
+  depends=('python-requests')
+
+  cd "$srcdir/${_pkgname}-$pkgver"
+  python setup.py install --root="$pkgdir/" --optimize=1
+}
+
+package_python2-requests-toolbelt() {
+  depends=('python2-requests')
+
+  cd "$srcdir/${_pkgname}-$pkgver-py2"
+  python2 setup.py install --root="$pkgdir/" --optimize=1
+}


More information about the arch-commits mailing list