Date: Tuesday, June 7, 2016 @ 11:45:18 Author: mtorromeo Revision: 178114
Added split pkg for python 3 Added: python-grequests/ Modified: python-grequests/trunk/PKGBUILD Deleted: python2-grequests/ ----------+ PKGBUILD | 42 +++++++++++++++++++++++++++++------------- 1 file changed, 29 insertions(+), 13 deletions(-) Modified: python-grequests/trunk/PKGBUILD =================================================================== --- python2-grequests/trunk/PKGBUILD 2016-06-07 09:40:36 UTC (rev 178113) +++ python-grequests/trunk/PKGBUILD 2016-06-07 09:45:18 UTC (rev 178114) @@ -1,30 +1,46 @@ # $Id$ # Maintainer: Massimiliano Torromeo <[email protected]> -pkgname=python2-grequests +pkgbase=python-grequests +pkgname=(python-grequests python2-grequests) +_libname=grequests pkgver=0.3.0 pkgrel=1 -_libname=${pkgname/python2-/} pkgdesc="Allows you to use Requests with Gevent to make asyncronous HTTP Requests easily." url="https://pypi.python.org/pypi/grequests/" -depends=('python2-requests' 'python2-gevent') -makedepends=('python2-distribute') license=('custom: ISC') arch=('any') -source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz - $pkgname-$pkgver-LICENSE::https://github.com/kennethreitz/grequests/raw/v$pkgver/LICENSE) +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 - find -type f -exec sed -i '1 s|python$|python2|' {} + - python2 setup.py build + + 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() { +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"/$pkgname-$pkgver-LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -m0644 -D "$srcdir"/$_libname-$pkgver-LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE } - -sha256sums=('0f41c4eee83bab39f5543af49665c08681637a0562a5704a3f7b2e4a996531c9' - '4063882a8913e4b37457d58fe6600bd975ba053c8db2e8c6b218e7c9c8575ca8')
