Add 'python2-requests-git/' from commit 'da1fbb7342aad3638053aafac9cd451cd59bd4bd'

git-subtree-dir: python2-requests-git
git-subtree-mainline: 8bb329a79c
git-subtree-split: da1fbb7342
This commit is contained in:
Cedric Girard 2019-02-14 15:32:16 +01:00
commit b2adeb81ac
3 changed files with 103 additions and 0 deletions

View file

@ -0,0 +1,27 @@
# Generated by mksrcinfo v8
# Fri Dec 4 15:25:14 UTC 2015
pkgbase = python2-requests-git
pkgdesc = Python HTTP for Humans.
pkgver = v2.8.1.59.g40ce366
pkgrel = 1
url = http://python-requests.org
arch = any
license = custom: ISC
makedepends = git
makedepends = python2-distribute
depends = python2
depends = python2-pyopenssl
depends = python2-ndg-httpsclient
depends = python2-pyasn1
optdepends = python2-certifi: SSL support
optdepends = python2-grequests: asynchronous requests with gevent
optdepends = python2-simplejson
provides = python2-requests
conflicts = python2-requests
source = requests::git+https://github.com/kennethreitz/requests.git
source = certs.patch
sha256sums = SKIP
sha256sums = db84c6224f77bbf55c49bd69db71a98b3798f1d3275d7079861e1fbade8cc03f
pkgname = python2-requests-git

View file

@ -0,0 +1,57 @@
# Maintainer: Cedric Girard <girard.cedric@gmail.com>
pkgname=python2-requests-git
pkgver=v2.8.1.59.g40ce366
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')
depends=('python2' 'python2-pyopenssl' 'python2-ndg-httpsclient' 'python2-pyasn1')
provides=('python2-requests')
license=('custom: ISC')
arch=('any')
source=('requests::git+https://github.com/kennethreitz/requests.git'
certs.patch
)
sha256sums=('SKIP'
'db84c6224f77bbf55c49bd69db71a98b3798f1d3275d7079861e1fbade8cc03f')
pkgver() {
cd "$srcdir"/requests
git describe --tags | sed 's|-|.|g'
}
prepare() {
cd "$srcdir"/requests
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
}
build(){
cd "$srcdir"/requests
python2 setup.py build
}
check() {
cd "$srcdir"/requests
test -f "$(python2 -m requests.certs)"
}
package() {
cd "$srcdir"/requests
python2 setup.py install --root="$pkgdir"
install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}
# vim:set ts=2 sw=2 et:

View file

@ -0,0 +1,19 @@
--- requests/certs.py.orig 2015-12-04 16:16:33.773055294 +0100
+++ requests/certs.py 2015-12-04 16:20:30.106729891 +0100
@@ -11,7 +11,6 @@
environment, you can change the definition of where() to return a separately
packaged CA bundle.
"""
-import os.path
try:
from certifi import where
@@ -19,7 +18,7 @@
def where():
"""Return the preferred certificate bundle."""
# vendored bundle inside Requests
- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
+ return "/etc/ssl/certs/ca-certificates.crt"
if __name__ == '__main__':
print(where())