aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Jeffers <sapientech@openmailbox.org>2016-08-13 12:23:31 -0700
committerEfraim Flashner <efraim@flashner.co.il>2016-09-20 21:27:56 +0300
commitb04a52a6fff5227c40feaca68984fed24dd28711 (patch)
treedc7a10d2b9b255ff249b920b75f9bb63052665f8
parentbe86b7adbc18b4861e5e3493799ab7bb41556640 (diff)
downloadpatches-b04a52a6fff5227c40feaca68984fed24dd28711.tar
patches-b04a52a6fff5227c40feaca68984fed24dd28711.tar.gz
gnu: Add python-requests-oauthlib.
* gnu/packages/python.scm (python-requests-oauthlib, python2-requests-oauthlib): New variables. Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
-rw-r--r--gnu/packages/python.scm45
1 files changed, 45 insertions, 0 deletions
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 96589fc165..65e6389708 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -28,6 +28,7 @@
;;; Copyright © 2016 David Craven <david@craven.ch>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2016 Stefan Reichoer <stefan@xsteve.at>
+;;; Copyright © 2016 Dylan Jeffers <sapientech@sapientech@openmailbox.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,6 +73,7 @@
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages networking)
#:use-module (gnu packages ncurses)
+ #:use-module (gnu packages openstack)
#:use-module (gnu packages password-utils)
#:use-module (gnu packages pcre)
#:use-module (gnu packages perl)
@@ -10033,6 +10035,49 @@ etc.")
(inherit base)
(name "ptpython2"))))
+(define-public python-requests-oauthlib
+ (package
+ (name "python-requests-oauthlib")
+ (version "0.6.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "requests-oauthlib" version))
+ (sha256
+ (base32
+ "0ykff67sjcl227c23g0rxzfx34rr5bf21kwv0z3zmgk0lfmch7hn"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ ;; removes tests that require network access
+ (add-before 'check 'pre-check
+ (lambda _
+ (delete-file "tests/test_core.py")
+ #t)))))
+ (native-inputs
+ `(("python-requests-mock" ,python-requests-mock)
+ ("python-mock" ,python-mock)))
+ (inputs
+ `(("python-oauthlib" ,python-oauthlib)
+ ("python-requests" ,python-requests)))
+ (home-page
+ "https://github.com/requests/requests-oauthlib")
+ (synopsis
+ "OAuthlib authentication support for Requests")
+ (description
+ "Requests-OAuthlib uses the Python Requests and OAuthlib libraries to
+provide an easy-to-use Python interface for building OAuth1 and OAuth2 clients.")
+ (license license:isc)
+ (properties `((python2-variant . ,(delay python2-requests-oauthlib))))))
+
+(define-public python2-requests-oauthlib
+ (let ((base (package-with-python2 (strip-python2-variant python-requests-oauthlib))))
+ (package
+ (inherit base)
+ (native-inputs `(("python2-setuptools" ,python2-setuptools)
+ ,@(package-native-inputs base))))))
+
(define-public python-stem
(package
(name "python-stem")