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.scm151
1 files changed, 129 insertions, 22 deletions
diff --git a/gnu/packages/python-web.scm b/gnu/packages/python-web.scm
index c714476aa8..997b98e2a9 100644
--- a/gnu/packages/python-web.scm
+++ b/gnu/packages/python-web.scm
@@ -4,7 +4,7 @@
;;; Copyright © 2017 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2016, 2017 Danny Milosavljevic <dannym+a@scratchpost.org>
;;; Copyright © 2013, 2014, 2015, 2016, 2020 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2016, 2017, 2019, 2020, 2021 Marius Bakke <marius@gnu.org>
+;;; Copyright © 2016, 2017, 2019-2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2017, 2021 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016, 2017, 2020 Julien Lepiller <julien@lepiller.eu>
@@ -47,6 +47,7 @@
;;; Copyright © 2021 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2021 jgart <jgart@dismail.de>
;;; Copyright © 2021 Alice Brenon <alice.brenon@ens-lyon.fr>
+;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -82,6 +83,7 @@
#:use-module (gnu packages libevent)
#:use-module (gnu packages libffi)
#:use-module (gnu packages node)
+ #:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
#:use-module (gnu packages python-build)
@@ -775,6 +777,40 @@ JSON Web Algorithms (JWA) - collectively can be used to encrypt and/or sign
content using a variety of algorithms.")
(license license:expat)))
+(define-public python-pyscss
+ (package
+ (name "python-pyscss")
+ (version "1.3.7")
+ (source
+ (origin
+ (method git-fetch) ; no tests in PyPI release
+ (uri (git-reference
+ (url "https://github.com/Kronuz/pyScss")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "0701hziiiw67blafgpmjhzspmrss8mfvif7fw0rs8fikddwwc9g6"))))
+ (build-system python-build-system)
+ (arguments
+ ;; XXX: error in test collection, possible incompatibility with Pytest 6.
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'check
+ (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+ (when tests?
+ (add-installed-pythonpath inputs outputs)
+ (invoke "python" "-m" "pytest" "--pyargs" "scss")))))))
+ (native-inputs
+ (list python-pytest python-pytest-cov))
+ (inputs
+ (list pcre))
+ (home-page "https://github.com/Kronuz/pyScss")
+ (synopsis "Scss compiler for Python")
+ (description "@code{pyScss} is a compiler for Sass, a superset language of
+CSS3 that adds programming capabilities and some other syntactic sugar.")
+ (license license:expat)))
+
(define-public python-jsonpickle
(package
(name "python-jsonpickle")
@@ -992,6 +1028,28 @@ between a web browser and web server.")
(define-public python2-sockjs-tornado
(package-with-python2 python-sockjs-tornado))
+(define-public python-flask-assets
+ (package
+ (name "python-flask-assets")
+ (version "2.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "Flask-Assets" version))
+ (sha256
+ (base32 "1hmqldxc7zciksmcl35jx0wbyrrxc7vk2a57mmmd8i07whsymz8x"))))
+ (build-system python-build-system)
+ (arguments
+ ;; Tests require python-flask-script which is incompatible with Flask2.
+ `(#:tests? #f))
+ (propagated-inputs
+ (list python-flask python-webassets))
+ (home-page "https://github.com/miracle2k/flask-assets")
+ (synopsis "Asset management for Flask")
+ (description "This package integrates @code{webassets} with Flask, adding
+support for merging, minifying and compiling CSS and Javascript files.")
+ (license license:bsd-2)))
+
(define-public python-flask-babel
(package
(name "python-flask-babel")
@@ -2356,32 +2414,44 @@ verification of the SSL peer.")
(define-public python-websocket-client
(package
(name "python-websocket-client")
- (version "0.54.0")
+ (version "1.2.3")
(source
(origin
(method url-fetch)
- (uri (pypi-uri "websocket_client" version))
+ (uri (pypi-uri "websocket-client" version))
(sha256
- (base32
- "0j88zmikaypf38lvpkf4aaxrjp9j07dmy5ghj7kli0fv3p4n45g5"))))
+ (base32 "1xba9z6b211pandrlk2l5p8wj6gn7yfkpq1sxfbqjl6c19n8258k"))))
(build-system python-build-system)
- (propagated-inputs
- (list python-six))
- (home-page "https://github.com/liris/websocket-client")
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'skip-network-test
+ (lambda _
+ ;; This test requires networking.
+ (substitute* "websocket/tests/test_http.py"
+ (("def testConnect") "def _testConnect"))))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "pytest" "-vv" "websocket/tests")))))))
+ (native-inputs
+ (list python-pysocks python-pytest python-websockets))
+ (home-page "https://github.com/websocket-client/websocket-client")
(synopsis "WebSocket client for Python")
(description "The Websocket-client module provides the low level APIs for
WebSocket usage in Python programs.")
- (properties `((python2-variant . ,(delay python2-websocket-client))))
(license license:lgpl2.1+)))
-(define-public python2-websocket-client
- (let ((base (package-with-python2
- (strip-python2-variant python-websocket-client))))
- (package/inherit base
- (native-inputs
- `(("python2-backport-ssl-match-hostname"
- ,python2-backport-ssl-match-hostname)
- ,@(package-native-inputs base))))))
+(define-public python-websocket-client-0.59
+ (package
+ (inherit python-websocket-client)
+ (version "0.59.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "websocket-client" version))
+ (sha256
+ (base32 "0p0cz2mdissq7iw1n7jrmsfir0jfmgs1dvnpnrx477ffx9hbsxnk"))))))
(define-public python-purl
(package
@@ -4190,6 +4260,30 @@ name resolutions asynchronously.")
for URL parsing and changing.")
(license license:asl2.0)))
+(define-public python-canvasapi
+ (package
+ (name "python-canvasapi")
+ (version "2.2.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/ucfopen/canvasapi")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0i13wrq2czcaz3h98pvnsl237104v611y9636jf32b1nn76sbp0p"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-pytz python-requests))
+ (native-inputs (list python-requests-mock))
+ (home-page "https://github.com/ucfopen/canvasapi")
+ (synopsis "API wrapper for the Canvas LMS")
+ (description
+ "CanvasAPI is a Python library for accessing Instructure’s Canvas LMS API.
+The library enables developers to programmatically manage Canvas courses,
+users, gradebooks, and more.")
+ (license license:expat)))
+
(define-public python-google
(package
(name "python-google")
@@ -5537,7 +5631,7 @@ based on filters.")
(define-public python-flask-restx
(package
(name "python-flask-restx")
- (version "0.2.0")
+ (version "0.5.1")
(source
;; We fetch from the Git repo because there are no tests in the PyPI
;; archive.
@@ -5548,7 +5642,7 @@ based on filters.")
(commit version)))
(file-name (git-file-name name version))
(sha256
- (base32 "0xf2vkmdngp9cv9klznizai4byxjcf0iqh1pr4b83nann0jxqwy7"))))
+ (base32 "18vrmknyxw6adn62pz3kr9kvazfgjgl4pgimdf8527fyyiwcqy15"))))
(build-system python-build-system)
(propagated-inputs
(list python-aniso8601 python-flask python-jsonschema python-pytz))
@@ -5566,7 +5660,8 @@ based on filters.")
(lambda _
(invoke "pytest" "--benchmark-skip" "-k"
;; Those tests need internet access
- "not test_check and not test_valid_value_check"))))))
+ "not test_check and not test_valid_value_check \
+and not test_override_app_level"))))))
(home-page "https://github.com/python-restx/flask-restx")
(synopsis
"Framework for fast, easy and documented API development with Flask")
@@ -6207,12 +6302,24 @@ provides well-defined APIs to talk to websites lacking one.")
(sha256
(base32 "07fhcjiyif80z1vyh35za29sqx1mmqh568jrbrrs675j4a797sj1"))))
(build-system python-build-system)
+ (arguments
+ '(#:phases (modify-phases %standard-phases
+ (add-after 'unpack 'loosen-requirements
+ (lambda _
+ ;; Don't pin specific versions of dependencies.
+ (substitute* "requirements.txt"
+ (("^sqlalchemy[=<>].*") "sqlalchemy\n")
+ (("^marshmallow[=<>].*") "marshmallow\n")
+ (("^Flask[=<>].*") "Flask\n"))))
+ (replace 'check
+ (lambda _
+ (invoke "pytest" "-vv"))))))
(propagated-inputs
(list python-flask
- python-marshmallow-3.2
+ python-marshmallow
python-marshmallow-jsonapi
python-simplejson
- python-sqlalchemy-1.3
+ python-sqlalchemy
python-apispec
python-simplejson
python-six))