efraim pushed a commit to branch master
in repository guix.

commit b04a52a6fff5227c40feaca68984fed24dd28711
Author: Dylan Jeffers <sapient...@openmailbox.org>
Date:   Sat Aug 13 12:23:31 2016 -0700

    gnu: Add python-requests-oauthlib.
    
    * gnu/packages/python.scm (python-requests-oauthlib,
    python2-requests-oauthlib): New variables.
    
    Signed-off-by: Efraim Flashner <efr...@flashner.co.il>
---
 gnu/packages/python.scm |   45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 96589fc..65e6389 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -28,6 +28,7 @@
 ;;; Copyright © 2016 David Craven <da...@craven.ch>
 ;;; Copyright © 2016 Marius Bakke <mba...@fastmail.com>
 ;;; Copyright © 2016 Stefan Reichoer <ste...@xsteve.at>
+;;; Copyright © 2016 Dylan Jeffers <sapientech@sapient...@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")

Reply via email to