2013-02-06 22:22:17 +01:00
|
|
|
# Maintainer: Cedric Girard <girard.cedric@gmail.com>
|
|
|
|
|
|
|
|
pkgname=python2-requests-git
|
2015-12-04 16:25:17 +01:00
|
|
|
pkgver=v2.8.1.59.g40ce366
|
2013-02-06 22:22:17 +01:00
|
|
|
pkgrel=1
|
|
|
|
_libname=${pkgname/python2-/}
|
|
|
|
pkgdesc="Python HTTP for Humans."
|
|
|
|
url="http://python-requests.org"
|
|
|
|
conflicts=('python2-requests')
|
|
|
|
makedepends=('git' 'python2-distribute')
|
|
|
|
optdepends=('python2-certifi: SSL support'
|
|
|
|
'python2-grequests: asynchronous requests with gevent'
|
|
|
|
'python2-simplejson')
|
2015-12-04 16:25:17 +01:00
|
|
|
depends=('python2' 'python2-pyopenssl' 'python2-ndg-httpsclient' 'python2-pyasn1')
|
2013-02-06 22:22:17 +01:00
|
|
|
provides=('python2-requests')
|
|
|
|
license=('custom: ISC')
|
|
|
|
arch=('any')
|
|
|
|
|
2014-06-23 15:35:14 +02:00
|
|
|
source=('requests::git+https://github.com/kennethreitz/requests.git'
|
|
|
|
certs.patch
|
|
|
|
)
|
|
|
|
sha256sums=('SKIP'
|
2015-12-04 16:25:17 +01:00
|
|
|
'db84c6224f77bbf55c49bd69db71a98b3798f1d3275d7079861e1fbade8cc03f')
|
2013-02-06 22:22:17 +01:00
|
|
|
|
2014-06-23 15:35:14 +02:00
|
|
|
pkgver() {
|
|
|
|
cd "$srcdir"/requests
|
|
|
|
git describe --tags | sed 's|-|.|g'
|
|
|
|
}
|
2013-02-06 22:22:17 +01:00
|
|
|
|
2014-06-23 15:35:14 +02:00
|
|
|
prepare() {
|
|
|
|
cd "$srcdir"/requests
|
2013-02-06 22:22:17 +01:00
|
|
|
|
|
|
|
patch -p0 -i "$srcdir/certs.patch"
|
|
|
|
find -type f -exec sed -i '1 s|python$|python2|' {} +
|
|
|
|
sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
|
|
|
|
rm -f requests/cacert.pem
|
2014-06-23 15:35:14 +02:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
build(){
|
|
|
|
cd "$srcdir"/requests
|
2013-02-06 22:22:17 +01:00
|
|
|
python2 setup.py build
|
|
|
|
}
|
|
|
|
|
|
|
|
check() {
|
2014-06-23 15:35:14 +02:00
|
|
|
cd "$srcdir"/requests
|
2013-02-06 22:22:17 +01:00
|
|
|
test -f "$(python2 -m requests.certs)"
|
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
2014-06-23 15:35:14 +02:00
|
|
|
cd "$srcdir"/requests
|
2013-02-06 22:22:17 +01:00
|
|
|
python2 setup.py install --root="$pkgdir"
|
|
|
|
install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
# vim:set ts=2 sw=2 et:
|