gnu: python-falcon: Update to 3.1.0.

* gnu/packages/python-web.scm (python-falcon): Update to 3.1.0.
[source]: Use git.  Adjust snippet.
[phases]{check}: Set HOME and invoke pytests with "-vv".
[native-inputs]: Add python-aiofiles, python-cbor2, python-fakeredis,
python-httpx, python-pecan, python-pillow, python-pytest-asyncio and
python-websockets.
[synopsis, description]: Fix indentation.
This commit is contained in:
Maxim Cournoyer 2022-04-18 09:48:12 -04:00
parent a64ea1f2d3
commit e5d3408022
No known key found for this signature in database
GPG key ID: 1260E46482E63562

View file

@ -668,14 +668,16 @@ (define-public python-cfn-lint
(define-public python-falcon (define-public python-falcon
(package (package
(name "python-falcon") (name "python-falcon")
(version "2.0.0") (version "3.1.0")
(source (source
(origin (origin
(method url-fetch) ;; Use git, as there are some test files missing from the PyPI release,
(uri (pypi-uri "falcon" version)) ;; such as 'examples' directory.
(sha256 (method git-fetch)
(base32 (uri (git-reference
"1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf")) (url "https://github.com/falconry/falcon")
(commit version)))
(file-name (git-file-name name version))
(modules '((guix build utils))) (modules '((guix build utils)))
(snippet (snippet
'(begin '(begin
@ -683,11 +685,13 @@ (define-public python-falcon
(substitute* "setup.py" (substitute* "setup.py"
((".*falcon\\.vendor\\.mimeparse.*") "")) ((".*falcon\\.vendor\\.mimeparse.*") ""))
(substitute* '("falcon/media/handlers.py" (substitute* '("falcon/media/handlers.py"
"falcon/request.py") "falcon/request.py"
(("from falcon\\.vendor ") "")) "tests/test_deps.py")
(substitute* "falcon.egg-info/SOURCES.txt" (("from falcon\\.vendor ") "")
(("falcon/vendor.*") "")) (("mimeparse.mimeparse") "mimeparse"))))
#t)))) (sha256
(base32
"17k31d8avl63xsr6fzvmkxcsm7gnz5dqpgsz65psm1lpc38c79k3"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases `(#:phases
@ -697,27 +701,33 @@ (define-public python-falcon
;; Skip orjson, which requires rust to build. ;; Skip orjson, which requires rust to build.
(substitute* "tests/test_media_handlers.py" (substitute* "tests/test_media_handlers.py"
(("== 'CPython") "!= 'CPython")) (("== 'CPython") "!= 'CPython"))
(add-installed-pythonpath inputs outputs) (setenv "HOME" "/tmp")
(invoke "pytest" "--ignore" "falcon")))))) (invoke "pytest" "-vv" "tests"))))))
(propagated-inputs (propagated-inputs
(list python-mimeparse)) (list python-mimeparse))
(native-inputs (native-inputs
(list python-cython ;for faster binaries (list python-aiofiles
python-cbor2
python-cython ;for faster binaries
python-fakeredis
python-httpx
python-mujson python-mujson
python-msgpack python-msgpack
python-pecan
python-pillow
python-pytest python-pytest
python-pytest-asyncio
python-pytest-runner python-pytest-runner
python-pyyaml python-pyyaml
python-rapidjson python-rapidjson
python-requests python-requests
python-testtools python-testtools
python-ujson)) python-ujson
python-websockets))
(home-page "https://falconframework.org") (home-page "https://falconframework.org")
(synopsis (synopsis "Web framework for building APIs and application backends")
"Web framework for building APIs and application backends") (description "Falcon is a web API framework for building microservices,
(description application backends and higher-level frameworks. Among its features are:
"Falcon is a web API framework for building microservices, application
backends and higher-level frameworks. Among its features are:
@itemize @itemize
@item Optimized and extensible code base @item Optimized and extensible code base
@item Routing via URI templates and REST-inspired resource @item Routing via URI templates and REST-inspired resource