diff options
author | Connor Prussin | 2017-10-17 18:43:42 -0700 |
---|---|---|
committer | Connor Prussin | 2017-10-17 19:00:57 -0700 |
commit | 834f7a213ed0cf2d12f911f2809c28633a63506e (patch) | |
tree | de6056d39a3fea083f8edee83c3d0725dbb6d14c | |
download | aur-834f7a213ed0cf2d12f911f2809c28633a63506e.tar.gz |
Initial Commit
-rw-r--r-- | .SRCINFO | 36 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 59 | ||||
-rw-r--r-- | README.md | 3 | ||||
-rw-r--r-- | certs.patch | 22 |
5 files changed, 124 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..c7be0522bcac --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,36 @@ +pkgbase = python2-requests-2.13.0 + pkgdesc = Python HTTP for Humans + pkgver = 2.13.0 + pkgrel = 1 + url = https://github.com/cprussin/python2-requests-2.13.0 + arch = any + license = Apache + checkdepends = python-pytest-httpbin + checkdepends = python2-pytest-httpbin + checkdepends = python-pytest-mock + checkdepends = python2-pytest-mock + checkdepends = python-pysocks + checkdepends = python2-pysocks + makedepends = python-setuptools + makedepends = python2-setuptools + makedepends = python-chardet + makedepends = python2-chardet + makedepends = python-urllib3 + makedepends = python2-urllib3 + makedepends = python-idna + makedepends = python2-idna + provides = python2-requests + conflicts = python2-requests + source = python2-requests-2.13.0-2.13.0.tar.gz::https://github.com/kennethreitz/requests/archive/v2.13.0.tar.gz + source = certs.patch + sha512sums = d39d0a50b05940175f0a6b7383d98c6882e28ccb23f84f25b3adc7527fa162f767dde02a67a11e82dc90e8482bd0d60c0efd8f27a73231e39d9b01b9e1d191b1 + sha512sums = 2918908b0595e409bc6c568c797c32a1f479bdd32eddcbe428e21b10f38291574f22ea7fcac17abb69622ea14cb1b22106fd7441e5ca33fe808bc25975c91b56 + +pkgname = python2-requests-2.13.0 + depends = python2-urllib3 + depends = python2-chardet + depends = python2-idna + optdepends = python2-ndg-httpsclient: HTTPS requests with SNI support + optdepends = python2-grequests: asynchronous requests with gevent + optdepends = python2-pysocks: SOCKS proxy support + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..5ff1828bacfc --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.tar.gz +*.pkg.tar.xz +src/ +pkg/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..7c6b7a093355 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,59 @@ +# $Id$ +# Maintainer: Connor Prussin <connor at prussin dot net> +# Contributor: Felix Yan <felixonmars@archlinux.org> +# Contributor: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> + +pkgname=python2-requests-2.13.0 +pkgver=2.13.0 +pkgrel=1 +pkgdesc="Python HTTP for Humans" +arch=('any') +url="https://github.com/cprussin/python2-requests-2.13.0" +license=('Apache') +makedepends=('python-setuptools' 'python2-setuptools' 'python-chardet' 'python2-chardet' + 'python-urllib3' 'python2-urllib3' 'python-idna' 'python2-idna') +checkdepends=('python-pytest-httpbin' 'python2-pytest-httpbin' 'python-pytest-mock' + 'python2-pytest-mock' 'python-pysocks' 'python2-pysocks') +provides=('python2-requests') +conflicts=('python2-requests') +source=("$pkgname-$pkgver.tar.gz::https://github.com/kennethreitz/requests/archive/v$pkgver.tar.gz" + certs.patch) +sha512sums=('d39d0a50b05940175f0a6b7383d98c6882e28ccb23f84f25b3adc7527fa162f767dde02a67a11e82dc90e8482bd0d60c0efd8f27a73231e39d9b01b9e1d191b1' + '2918908b0595e409bc6c568c797c32a1f479bdd32eddcbe428e21b10f38291574f22ea7fcac17abb69622ea14cb1b22106fd7441e5ca33fe808bc25975c91b56') + +prepare() { + cd "$srcdir"/requests-$pkgver + sed -e '/certifi/d' \ + -i 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() { + 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" +} diff --git a/README.md b/README.md new file mode 100644 index 000000000000..a0d2148972d9 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# python2-requests-2.13.0 + +An arch linux package for the python2 `requests` library, frozen at 2.13.0. diff --git a/certs.patch b/certs.patch new file mode 100644 index 000000000000..489c7d0e2021 --- /dev/null +++ b/certs.patch @@ -0,0 +1,22 @@ +diff --git a/requests/certs.py b/requests/certs.py +index f922b99..3f19c60 100644 +--- a/requests/certs.py ++++ b/requests/certs.py +@@ -11,15 +11,9 @@ If you are packaging Requests, e.g., for a Linux distribution or a managed + environment, you can change the definition of where() to return a separately + packaged CA bundle. + """ +-import os.path + +-try: +- from certifi import where +-except ImportError: +- def where(): +- """Return the preferred certificate bundle.""" +- # vendored bundle inside Requests +- return os.path.join(os.path.dirname(__file__), 'cacert.pem') ++def where(): ++ return "/etc/ssl/certs/ca-certificates.crt" + + if __name__ == '__main__': + print(where()) |