summaryrefslogtreecommitdiff
path: root/gnu/packages/python-web.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/python-web.scm')
-rw-r--r--gnu/packages/python-web.scm166
1 files changed, 119 insertions, 47 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index e48e4773df..3239086dc3 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -52,6 +52,7 @@
;;; Copyright © 2022 Felix Gruber <felgru@posteo.net>
;;; Copyright © 2022 Peter Polidoro <peter@polidoro.io>
;;; Copyright © 2022 Antero Mejr <antero@mailbox.org>
+;;; Copyright © 2022 Luis Henrique Gomes Higino <luishenriquegh2701@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -72,16 +73,20 @@
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system python)
#:use-module (guix gexp)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages base)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages check)
#:use-module (gnu packages compression)
#:use-module (gnu packages curl)
#:use-module (gnu packages databases)
#:use-module (gnu packages django)
+ #:use-module (gnu packages freedesktop)
+ #:use-module (gnu packages gnupg)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages groff)
#:use-module (gnu packages libevent)
@@ -2072,9 +2077,10 @@ connection to each user.")
'(#:phases
(modify-phases %standard-phases
(replace 'check
- (lambda _
- (invoke "python" "-m" "tornado.test.runtests")
- #t)))))
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (setenv "ASYNC_TEST_TIMEOUT" "25") ; Like in tox.ini.
+ (invoke "python" "-m" "tornado.test.runtests")))))))
(native-inputs
(list python-certifi))
(home-page "https://www.tornadoweb.org/")
@@ -2776,13 +2782,13 @@ APIs.")
(define-public python-requests
(package
(name "python-requests")
- (version "2.27.1")
+ (version "2.28.1")
(source (origin
(method url-fetch)
(uri (pypi-uri "requests" version))
(sha256
(base32
- "0qcsbi919d689xqlgyhw9zkppp1fs6k09wwffa3ri6d8smpwbmv8"))))
+ "10vrr7bijzrypvms3g2sgz8vya7f9ymmcv423ikampgy0aqrjmbw"))))
(build-system python-build-system)
(propagated-inputs
(list python-certifi
@@ -2953,6 +2959,76 @@ with python-requests.")
adapter for use with the Requests library.")
(license license:asl2.0)))
+(define-public python-msal
+ (package
+ (name "python-msal")
+ (version "1.18.0")
+ (home-page
+ "https://github.com/AzureAD/microsoft-authentication-library-for-python")
+ (source (origin
+ (method git-fetch)
+ ;; Pypi does not have tests.
+ (uri (git-reference (url home-page) (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "02d9vlvp08q1yffgn7a0y19451py1jly67q5ld6m2d9xidbrvac1"))))
+ (build-system python-build-system)
+ (arguments
+ ;; Tests (all?) rely on network access and only some can be disabled by
+ ;; setting the environment variable TRAVIS_TAG.
+ (list #:tests? #f))
+ (native-inputs (list python-mock))
+ (propagated-inputs (list python-cryptography python-pyjwt python-requests))
+ (synopsis "Microsoft Authentication Library (MSAL) for Python")
+ (description
+ "The Microsoft Authentication Library for Python enables applications to
+integrate with the Microsoft identity platform. It allows you to sign in
+users or apps with Microsoft identities (Azure AD, Microsoft Accounts and
+Azure AD B2C accounts) and obtain tokens to call Microsoft APIs such as
+Microsoft Graph or your own APIs registered with the Microsoft identity
+platform. It is built using industry standard OAuth2 and OpenID Connect
+protocols.")
+ (license license:expat)))
+
+(define-public oauth2ms
+ (let ((commit "a1ef0cabfdea57e9309095954b90134604e21c08")
+ (revision "0"))
+ (package
+ (name "oauth2ms")
+ (version (git-version "0.0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/harishkrupo/oauth2ms")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0dqi6n4npdrvb42r672n4sl1jl8z5lsk554fwiiihpj0faa9dx64"))))
+ (build-system copy-build-system)
+ (arguments
+ (list #:install-plan #~`(("oauth2ms" "bin/oauth2ms")
+ ("." #$(string-append "share/doc/" name "-"
+ version "/")
+ #:include-regexp ("\\.org$")))
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'install 'wrap-pythonpath
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((path (getenv "GUIX_PYTHONPATH")))
+ (wrap-program (string-append #$output
+ "/bin/oauth2ms")
+ `("GUIX_PYTHONPATH" ":" prefix
+ (,path)))))))))
+ (inputs (list bash-minimal python python-gnupg python-msal python-pyxdg))
+ (home-page "https://github.com/harishkrupo/oauth2ms")
+ (synopsis "XOAUTH2 compatible Microsoft Office 365 token fetcher")
+ (description
+ "Oauth2ms can be used to fetch OAuth 2.0 tokens from the Microsoft Identity
+endpoint. Additionally, it can encode the token in the XOAUTH2 format to be
+used as authentication in IMAP mail servers.")
+ (license license:asl2.0))))
+
(define-public python-oauthlib
(package
(name "python-oauthlib")
@@ -3037,14 +3113,14 @@ addon for removing tracking fields from URLs.")
(define-public python-urllib3
(package
(name "python-urllib3")
- (version "1.26.8")
+ (version "1.26.9")
(source
(origin
(method url-fetch)
(uri (pypi-uri "urllib3" version))
(sha256
(base32
- "0g18xk7gfm88gr4bp3f58vgvsbzwps3sq2kqhv5xyz9ylvck6z0f"))))
+ "13j4mkk6vgix4bixfqk3fhydsl3r5f61z94ss4fmwsl0fxjg3fma"))))
(build-system python-build-system)
(arguments `(#:tests? #f))
(propagated-inputs
@@ -5179,50 +5255,46 @@ interfaces, inferring which argument is the path, and which is the address.")
(license license:expat)))
(define-public grip
- ;; No release by upstream for quite some time, some bugs fixed since. See:
- ;; https://github.com/joeyespo/grip/issues/304
- (let ((commit "27a4d6d87ea1d0ea7f7f120de55baabee3de73e3"))
- (package
- (name "grip")
- (version (git-version "4.5.2" "1" commit))
- (source
- (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/joeyespo/grip")
- (commit commit)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "0kx5hgb3q19i4l18a4vqdq9af390xgpk88lp2ay75qi96k0dc68w"))))
- (build-system python-build-system)
- (propagated-inputs
- (list python-docopt
- python-flask
- python-markdown
- python-path-and-address
- python-pygments
- python-requests))
- (native-inputs
- (list python-pytest python-responses))
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'check
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (add-installed-pythonpath inputs outputs)
- (setenv "PATH" (string-append
- (getenv "PATH") ":"
- (assoc-ref %outputs "out") "/bin"))
- (invoke "py.test" "-m" "not assumption"))))))
- (home-page "https://github.com/joeyespo/grip")
- (synopsis "Preview Markdown files using the GitHub API")
- (description "Grip is a command-line server application written in Python
+ (package
+ (name "grip")
+ (version "4.6.1")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/joeyespo/grip")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0vhimd99zw7s1fihwr6yfij6ywahv9gdrfcf5qljvzh75mvzcwh8"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-docopt
+ python-flask
+ python-markdown
+ python-path-and-address
+ python-pygments
+ python-requests))
+ (native-inputs (list python-pytest python-responses))
+ (arguments
+ (list #:phases
+ #~(modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (setenv "PATH"
+ (string-append (getenv "PATH") ":"
+ #$output "/bin"))
+ (invoke "py.test" "-m" "not assumption")))))))
+ (home-page "https://github.com/joeyespo/grip")
+ (synopsis "Preview Markdown files using the GitHub API")
+ (description
+ "Grip is a command-line server application written in Python
that uses the GitHub Markdown API to render a local Markdown file. The styles
and rendering come directly from GitHub, so you'll know exactly how it will
appear. Changes you make to the file will be instantly reflected in the browser
without requiring a page refresh.")
- (license license:expat))))
+ (license license:expat)))
(define-public python-port-for
(package