summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Schmitz <ercpe@gentoo.org>2016-08-13 07:07:51 +0200
committerJohann Schmitz <ercpe@gentoo.org>2016-08-13 07:07:51 +0200
commitb4da8d5f73eb06e9f7738ed0f759049e40ed6ae6 (patch)
treea963160068df53fb9f96315af8e3fb18135ea145 /dev-python
parentnet-firewall/shorewall: Cleanup (diff)
downloadgentoo-b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6.tar.gz
gentoo-b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6.tar.bz2
gentoo-b4da8d5f73eb06e9f7738ed0f759049e40ed6ae6.zip
dev-python/requests-oauthlib: Version bump to 0.6.2 (bug #565590)
Package-Manager: portage-2.2.28
Diffstat (limited to 'dev-python')
-rw-r--r--dev-python/requests-oauthlib/Manifest1
-rw-r--r--dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch61
-rw-r--r--dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild35
3 files changed, 36 insertions, 61 deletions
diff --git a/dev-python/requests-oauthlib/Manifest b/dev-python/requests-oauthlib/Manifest
index 3851474252e2..d637eda7301d 100644
--- a/dev-python/requests-oauthlib/Manifest
+++ b/dev-python/requests-oauthlib/Manifest
@@ -1 +1,2 @@
DIST requests-oauthlib-0.4.1.tar.gz 34945 SHA256 446e44c937bdb1ff9d62b8892c8df04614a910bc825b9e57aa0916fcad28a26f SHA512 ac4b33757ba1f8eea152ce7fe63bdb1b7b56c741e6743f740b9470b1b27244975d4ff7d5dea3dce3b59136e4eec825d538c6085545837d8433b395b500b425c1 WHIRLPOOL dec0b688910d404cc10e8554ebc2e58038e49386c6cf7c64a2e89c65dba4bda88d21dd2cefa57ffee3da90fb01746fa89b161a0e6768ff4215e29dd82f3e88cb
+DIST requests-oauthlib-0.6.2.tar.gz 40307 SHA256 29ad3c4cb1e880713a54bee17c6345ccf8be047544429ee62237843f5ec73323 SHA512 da188c6a6449ffa201fae6e2f0a0e5474b140efc55a00dfc31483726cfd860fc22cad654c4af0a4b81144100678ddf4c082f54fc9098a6a99e0a4857f22aae62 WHIRLPOOL 7d2cba69eb5be9205fb0f18fdc696e26cc223e09765dd31f6ba402e498471678baafde067c2f1d709b4d38b90e4957549c714752d658e00abe9f2203ab7d189c
diff --git a/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch b/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch
deleted file mode 100644
index 517e4a29fc09..000000000000
--- a/dev-python/requests-oauthlib/files/requests-oauthlib-0.4.0-expires_at.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-https://github.com/requests/requests-oauthlib/commit/7057cbee773c1dff1856730ca661cc71abb2506e.diff
-https://github.com/requests/requests-oauthlib/commit/8c2c96c4bb45803df2779cfde90868445977ab96.diff
-diff --git a/tests/test_oauth2_session.py b/tests/test_oauth2_session.py
-index 305241a..cf095a5 100644
---- a/tests/test_oauth2_session.py
-+++ b/tests/test_oauth2_session.py
-@@ -1,6 +1,7 @@
- from __future__ import unicode_literals
- import json
- import mock
-+import time
- import unittest
-
- from oauthlib.common import urlencode
-@@ -11,6 +11,9 @@
- from requests_oauthlib import OAuth2Session, TokenUpdated
-
-
-+fake_time = time.time()
-+
-+
- class OAuth2SessionTest(unittest.TestCase):
-
- def setUp(self):
-@@ -22,7 +25,8 @@ def setUp(self):
- 'token_type': 'Bearer',
- 'access_token': 'asdfoiw37850234lkjsdfsdf',
- 'refresh_token': 'sldvafkjw34509s8dfsdf',
-- 'expires_in': '3600'
-+ 'expires_in': '3600',
-+ 'expires_at': fake_time + 3600,
- }
- self.client_id = 'foo'
- self.clients = [
-@@ -66,9 +70,11 @@ def test_authorization_url(self):
- self.assertIn(self.client_id, auth_url)
- self.assertIn('response_type=token', auth_url)
-
-+ @mock.patch("time.time", new=lambda: fake_time)
- def test_refresh_token_request(self):
- self.expired_token = dict(self.token)
- self.expired_token['expires_in'] = '-1'
-+ del self.expired_token['expires_at']
-
- def fake_refresh(r, **kwargs):
- resp = mock.MagicMock()
-@@ -98,12 +104,14 @@ def token_updater(token):
- auth.send = fake_refresh
- auth.get('https://i.b')
-
-+ @mock.patch("time.time", new=lambda: fake_time)
- def test_token_from_fragment(self):
- mobile = MobileApplicationClient(self.client_id)
- response_url = 'https://i.b/callback#' + urlencode(self.token.items())
- auth = OAuth2Session(client=mobile)
- self.assertEqual(auth.token_from_fragment(response_url), self.token)
-
-+ @mock.patch("time.time", new=lambda: fake_time)
- def test_fetch_token(self):
- def fake_token(token):
- def fake_send(r, **kwargs):
diff --git a/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild b/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild
new file mode 100644
index 000000000000..d994bbc35ef6
--- /dev/null
+++ b/dev-python/requests-oauthlib/requests-oauthlib-0.6.2.ebuild
@@ -0,0 +1,35 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+PYTHON_COMPAT=( python{2_7,3_3,3_4} )
+
+inherit distutils-r1
+
+DESCRIPTION="This project provides first-class OAuth library support for Requests"
+HOMEPAGE="https://github.com/requests/requests-oauthlib"
+SRC_URI="https://github.com/requests/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+SLOT="0"
+LICENSE="ISC"
+KEYWORDS="~amd64 ~x86"
+IUSE="test"
+
+DEPEND="test? (
+ dev-python/mock[${PYTHON_USEDEP}]
+ dev-python/requests-mock[${PYTHON_USEDEP}]
+ )"
+RDEPEND="
+ >=dev-python/requests-2.0.0[${PYTHON_USEDEP}]
+ >=dev-python/oauthlib-0.6.2[${PYTHON_USEDEP}]"
+
+#Refrain from a doc build for now
+#python_compile_all() {
+# use doc && emake -C docs html
+#}
+
+python_test() {
+ esetup.py test
+}