diff options
author | Britney Fransen <brfransen@gmail.com> | 2017-07-16 04:32:11 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2017-07-16 04:32:11 (GMT) |
commit | 34677dae9b19cf4c8731b99d41a97ec47c6c795e (patch) | |
tree | 3f38a0c2fea8de1d5fd7655fa82c7d8f1ee09a34 /abs/core/python_modules/python-requests/PKGBUILD | |
parent | 6306f7ae1895d7678eac708d86465e6e6cd8e4f0 (diff) | |
download | linhes_pkgbuild-34677dae9b19cf4c8731b99d41a97ec47c6c795e.zip linhes_pkgbuild-34677dae9b19cf4c8731b99d41a97ec47c6c795e.tar.gz linhes_pkgbuild-34677dae9b19cf4c8731b99d41a97ec47c6c795e.tar.bz2 |
python-requests: initial inclusion. dep of flexget
Diffstat (limited to 'abs/core/python_modules/python-requests/PKGBUILD')
-rw-r--r-- | abs/core/python_modules/python-requests/PKGBUILD | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/abs/core/python_modules/python-requests/PKGBUILD b/abs/core/python_modules/python-requests/PKGBUILD new file mode 100644 index 0000000..d5e1fb4 --- /dev/null +++ b/abs/core/python_modules/python-requests/PKGBUILD @@ -0,0 +1,64 @@ +# $Id$ +# Maintainer: Felix Yan <felixonmars@archlinux.org> +# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> + +pkgbase=python-requests +pkgname=('python2-requests') +pkgver=2.18.1 +pkgrel=1 +pkgdesc="Python HTTP for Humans" +arch=('any') +url="http://python-requests.org" +license=('Apache') +makedepends=('python2-setuptools' 'python2-chardet' + 'python2-urllib3' 'python2-idna') +checkdepends=('python2-pytest-httpbin' + 'python2-pytest-mock' 'python2-pysocks') +source=("$pkgbase-$pkgver.tar.gz::https://github.com/kennethreitz/requests/archive/v$pkgver.tar.gz" + certs.patch) +sha512sums=('a80e0487b4b729e69522817bc2eec2a9c5f1df34df385581b3e937c2409e0fcb4e1f9b4794b198c8b8a57fc05b1bc513fc70d41b324ae251de0fa9bc7c9e6947' + '424a3bb01b23409284f6c9cd2bc22d92df31b85cfd96e1d1b16b5d68adeca670dfed4fff7977d8b10980102b0f780eacc465431021fcd661f3a17168a02a39a3') + +prepare() { + cd "$srcdir"/requests-$pkgver + sed -i '/certifi/d' setup.py + patch -p1 -i "$srcdir"/certs.patch + + cd "$srcdir" + cp -a requests-$pkgver{,-py2} + find requests-$pkgver-py2 -name \*.py -exec sed -r 's|^#!(.*)python$|#!\1python2|' -i {} + +} + +build() { +# cd "$srcdir"/requests-$pkgver +# python setup.py build + + cd "$srcdir"/requests-$pkgver-py2 + python2 setup.py build +} + +check() { +# cd "$srcdir"/requests-$pkgver +# py.test tests + + cd "$srcdir"/requests-$pkgver-py2 + py.test2 tests +} + +package_python-requests() { + depends=('python-urllib3' 'python-chardet' 'python-idna') + optdepends=('python-pysocks: SOCKS proxy support') + + cd "$srcdir"/requests-$pkgver + python setup.py install --skip-build -O1 --root="$pkgdir" +} + +package_python2-requests() { + depends=('python2-urllib3' 'python2-chardet' 'python2-idna') + optdepends=('python2-ndg-httpsclient: HTTPS requests with SNI support' + 'python2-grequests: asynchronous requests with gevent' + 'python2-pysocks: SOCKS proxy support') + + cd "$srcdir"/requests-$pkgver-py2 + python2 setup.py install --skip-build -O1 --root="$pkgdir" +} |