[arch-commits] Commit in python-requests/repos/community-any (4 files)
Massimiliano Torromeo
mtorromeo at nymeria.archlinux.org
Wed Apr 3 08:53:08 UTC 2013
Date: Wednesday, April 3, 2013 @ 10:53:08
Author: mtorromeo
Revision: 87556
archrelease: copy trunk to community-any
Added:
python-requests/repos/community-any/PKGBUILD
(from rev 87555, python-requests/trunk/PKGBUILD)
python-requests/repos/community-any/certs.patch
(from rev 87555, python-requests/trunk/certs.patch)
Deleted:
python-requests/repos/community-any/PKGBUILD
python-requests/repos/community-any/certs.patch
-------------+
PKGBUILD | 96 +++++++++++++++++++++++++++++++++++-----------------------
certs.patch | 37 ++++++++++------------
2 files changed, 75 insertions(+), 58 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2013-04-03 08:51:12 UTC (rev 87555)
+++ PKGBUILD 2013-04-03 08:53:08 UTC (rev 87556)
@@ -1,38 +0,0 @@
-# $Id: PKGBUILD 82418 2013-01-17 10:12:30Z mtorromeo $
-# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
-
-pkgname=python-requests
-pkgver=1.1.0
-pkgrel=2
-_libname=${pkgname/python-/}
-pkgdesc="Python HTTP for Humans."
-url="http://python-requests.org"
-depends=('python')
-makedepends=('python-distribute')
-optdepends=('python-certifi: SSL support')
-license=('custom: ISC')
-arch=('any')
-source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz
- certs.patch)
-
-build() {
- cd "$srcdir/$_libname-$pkgver"
- patch -p0 -i "$srcdir/certs.patch"
- sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
- rm -f requests/cacert.pem
- python setup.py build
-}
-
-check() {
- cd "$srcdir/$_libname-$pkgver"
- test -f "$(python -m requests.certs)"
-}
-
-package() {
- cd "$srcdir/$_libname-$pkgver"
- python setup.py install --root="$pkgdir"
- install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
-}
-
-sha256sums=('21a81ddf1a3c2f956524538966ae19c38cae251f5629821588cdc8246a1335f7'
- '97d5ee56c0e03d6c5c9791be3d9f4756252cfd74f1ab4bb6593fa2555fe3760e')
Copied: python-requests/repos/community-any/PKGBUILD (from rev 87555, python-requests/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2013-04-03 08:53:08 UTC (rev 87556)
@@ -0,0 +1,58 @@
+# $Id$
+# Maintainer: Massimiliano Torromeo <massimiliano.torromeo at gmail.com>
+
+pkgbase=python-requests
+pkgname=(python-requests python2-requests)
+pkgver=1.2.0
+pkgrel=1
+_libname=requests
+pkgdesc="Python HTTP for Humans."
+url="http://python-requests.org"
+makedepends=('python-distribute' 'python2-distribute')
+license=('custom: ISC')
+arch=('any')
+source=(http://pypi.python.org/packages/source/${_libname:0:1}/$_libname/$_libname-$pkgver.tar.gz
+ certs.patch)
+
+build() {
+ cd "$srcdir/$_libname-$pkgver"
+ patch -p0 -i "$srcdir/certs.patch"
+ sed -r 's#(\W|^)requests/cacert\.pem(\W|$)##' -i MANIFEST.in
+ rm -f requests/cacert.pem
+
+ 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 's|^#!(.*)python$|#!\1python2|' -i {} +
+}
+
+check() {
+ cd "$srcdir/$_libname-$pkgver"
+ test -f "$(python -m requests.certs)"
+}
+
+package_python-requests() {
+ depends=(python)
+
+
+ cd "$srcdir/$_libname-$pkgver"
+ rm -rf build; ln -s ../buildpy3 build
+ python setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+package_python2-requests() {
+ depends=(python2)
+ optdepends=('python2-grequests: asynchronous requests with gevent'
+ 'python2-simplejson')
+
+ cd "$srcdir/$_libname-$pkgver"
+ rm -rf build; ln -s ../buildpy2 build
+ python2 setup.py install --skip-build -O1 --root="$pkgdir"
+ install -m0644 -D "LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
+
+sha256sums=('cfa615644ae38efe8423ce9edb23470a4615a9147fa3cea5026afb47c9bb3913'
+ '55f8ae9c2a81c65fb2e8d94b23cff58524ddfbb31ea5180219e6a79db2975805')
Deleted: certs.patch
===================================================================
--- certs.patch 2013-04-03 08:51:12 UTC (rev 87555)
+++ certs.patch 2013-04-03 08:53:08 UTC (rev 87556)
@@ -1,20 +0,0 @@
---- requests/certs.py.orig 2013-01-17 10:46:56.363521556 +0100
-+++ requests/certs.py 2013-01-17 10:52:17.288319297 +0100
-@@ -12,8 +12,6 @@
- packaged CA bundle.
- """
-
--import os.path
--
- certifi = None
- try:
- import certifi
-@@ -25,7 +23,7 @@
- if certifi:
- return certifi.where()
-
-- return os.path.join(os.path.dirname(__file__), 'cacert.pem')
-+ return "/etc/ssl/certs/ca-certificates.crt"
-
- if __name__ == '__main__':
- print(where())
Copied: python-requests/repos/community-any/certs.patch (from rev 87555, python-requests/trunk/certs.patch)
===================================================================
--- certs.patch (rev 0)
+++ certs.patch 2013-04-03 08:53:08 UTC (rev 87556)
@@ -0,0 +1,17 @@
+--- requests/certs.py.orig 2013-04-03 10:25:52.618680901 +0200
++++ requests/certs.py 2013-04-03 10:26:29.291120949 +0200
+@@ -12,13 +12,11 @@
+ packaged CA bundle.
+ """
+
+-import os.path
+-
+
+ 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())
More information about the arch-commits
mailing list