From 536a71345f1b96905c430850bdb78b83fd6b3c5c Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Sat, 13 Aug 2016 12:23:31 -0700 Subject: [PATCH 1/2] gnu: Add python-requests-oauthlib * gnu/packages/python.scm (python-requests-oauthlib, * python2-requests-oauthlib): New variables. --- gnu/packages/python.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 6ff1c5c..a7e5d42 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2016 Troy Sankey ;;; Copyright © 2016 ng0 +;;; Copyright © 2016 Dylan Jeffers ;;; ;;; This file is part of GNU Guix. ;;; @@ -9852,3 +9853,45 @@ etc.") (package (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 + "This package provides first-class OAuth library +support for python-requests.") + (license isc))) + +(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)))))) + -- 2.7.3 From 5300fd89c45514077551eeceaede84139b127854 Mon Sep 17 00:00:00 2001 From: Dylan Jeffers Date: Sat, 13 Aug 2016 12:29:13 -0700 Subject: [PATCH 2/2] gnu: Add python-pypump. * gnu/packages/python.scm (python-pypump, python2-pypump): New * variables. --- gnu/packages/python.scm | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a7e5d42..465ee2b 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -9895,3 +9895,42 @@ support for python-requests.") (native-inputs `(("python2-setuptools" ,python2-setuptools) ,@(package-native-inputs base)))))) +(define-public python-pypump + (package + (name "python-pypump") + (version "0.6") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xray7224/PyPump") + (commit "6b612a7ed3c5a9b0a0190f3999fcddb851d1900f"))) + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 + "0xy9kw54a2dasc5jig1rmllwv6y3pngbw8pvi0yx2qfpswgr5qbg")))) + (build-system python-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("python-requests" ,python-requests) + ("python-oauthlib" ,python-oauthlib) + ("python-requests-oauthlib" ,python-requests-oauthlib) + ("python-dateutil-2" ,python-dateutil-2))) + (home-page "https://github.com/xray7224/PyPump") + (synopsis "Python Pump.io library") + (description "PyPump is a simple but powerful and pythonic +way of interfacing with the pump.io API.") + (license gpl3+))) + +(define-public python2-pypump + (let ((base (package-with-python2 (strip-python2-variant python-pypump)))) + (package + (inherit base) + (inputs `(("python2-requests" ,python2-requests) + ("python2-oauthlib" ,python2-oauthlib) + ("python2-requests-oauthlib" ,python2-requests-oauthlib) + ("python2-pyasn1" ,python2-pyasn1) + ("python2-pyopenssl" ,python2-pyopenssl) + ("python2-ndg-httpsclient" ,python2-ndg-httpsclient) + ("python2-dateutil-2" ,python2-dateutil-2)))))) -- 2.7.3