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

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Sun Dec 25 17:46:49 UTC 2016


    Date: Sunday, December 25, 2016 @ 17:46:48
  Author: bpiotrowski
Revision: 202143

archrelease: copy trunk to community-staging-any

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

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

Copied: python-grequests/repos/community-staging-any/PKGBUILD (from rev 202142, python-grequests/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2016-12-25 17:46:48 UTC (rev 202143)
@@ -0,0 +1,46 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=python-grequests
+pkgname=(python-grequests python2-grequests)
+_libname=grequests
+pkgver=0.3.0
+pkgrel=2
+pkgdesc="Allows you to use Requests with Gevent to make asyncronous HTTP Requests easily."
+url="https://pypi.python.org/pypi/grequests/"
+license=('custom: ISC')
+arch=('any')
+makedepends=('python-setuptools' 'python2-setuptools')
+source=(https://files.pythonhosted.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz
+        $_libname-$pkgver-LICENSE::https://github.com/kennethreitz/grequests/raw/v$pkgver/LICENSE)
+sha256sums=('0f41c4eee83bab39f5543af49665c08681637a0562a5704a3f7b2e4a996531c9'
+            '4063882a8913e4b37457d58fe6600bd975ba053c8db2e8c6b218e7c9c8575ca8')
+
+build() {
+    cd "$srcdir"/$_libname-$pkgver
+
+    rm -rf ../buildpy3; mkdir ../buildpy3
+    python setup.py build -b ../buildpy3
+
+    rm -rf ../buildpy2; mkdir ../buildpy2
+    python2 setup.py build -b ../buildpy2
+    find ../buildpy2 -name \*.py -exec sed -r '1 s|^#!(.*)python$|#!\1python2|' -i {} +
+}
+
+package_python-grequests() {
+    depends=('python-requests' 'python-gevent')
+
+    cd "$srcdir"/$_libname-$pkgver
+    rm -rf build; ln -s ../buildpy3 build
+    python setup.py install --skip-build -O1 --root="$pkgdir"
+	install -m0644 -D "$srcdir"/$_libname-$pkgver-LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}
+
+package_python2-grequests() {
+    depends=('python2-requests' 'python2-gevent')
+
+    cd "$srcdir"/$_libname-$pkgver
+    rm -rf build; ln -s ../buildpy2 build
+    python2 setup.py install --skip-build -O1 --root="$pkgdir"
+	install -m0644 -D "$srcdir"/$_libname-$pkgver-LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE
+}



More information about the arch-commits mailing list