From b04a52a6fff5227c40feaca68984fed24dd28711 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Sat, 13 Aug 2016 12:23:31 -0700 Subject: gnu: Add python-requests-oauthlib. * gnu/packages/python.scm (python-requests-oauthlib, python2-requests-oauthlib): New variables. Signed-off-by: Efraim Flashner --- gnu/packages/python.scm | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) 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 ;;; Copyright © 2016 Marius Bakke ;;; Copyright © 2016 Stefan Reichoer +;;; Copyright © 2016 Dylan Jeffers ;;; ;;; This file is part of GNU Guix. ;;; @@ -72,6 +73,7 @@ (define-module (gnu packages python) #: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 @@ (define-public ptpython-2 (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") -- cgit v1.2.3