gnu: python-falcon: Update to 2.0.0.
* gnu/packages/python-web.scm (python-falcon): Update to 2.0.0. [source]: Add snippet to remove bundled code. [arguments]: Update custom 'check phase. [propagated-inputs]: Remove python-six. [native-inputs]: Remove python-jsonschema. Add python-mujson, python-pytest-runner, python-rapidjson, python-ujson. [properties]: New field. (python2-falcon)[native-inputs]: Don't add python-rapidjson.master
parent
255a206217
commit
45838753bb
|
@ -222,32 +222,50 @@ comes with a SOCKS proxy client.")
|
||||||
(define-public python-falcon
|
(define-public python-falcon
|
||||||
(package
|
(package
|
||||||
(name "python-falcon")
|
(name "python-falcon")
|
||||||
(version "1.4.1")
|
(version "2.0.0")
|
||||||
(source
|
(source
|
||||||
(origin
|
(origin
|
||||||
(method url-fetch)
|
(method url-fetch)
|
||||||
(uri (pypi-uri "falcon" version))
|
(uri (pypi-uri "falcon" version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"1i0vmqsk24z4biirqhpvas9h28wy7nmpy3jvnb6rz2imq04zd09r"))))
|
"1z6mqfv574x6jiawf67ib52g4kk20c2x7xk7wrn1573b8v7r79gf"))
|
||||||
|
(modules '((guix build utils)))
|
||||||
|
(snippet
|
||||||
|
'(begin
|
||||||
|
(delete-file-recursively "falcon/vendor")
|
||||||
|
(substitute* "setup.py"
|
||||||
|
((".*falcon\\.vendor\\.mimeparse.*") ""))
|
||||||
|
(substitute* '("falcon/media/handlers.py"
|
||||||
|
"falcon/request.py")
|
||||||
|
(("from falcon\\.vendor ") ""))
|
||||||
|
(substitute* "falcon.egg-info/SOURCES.txt"
|
||||||
|
(("falcon/vendor.*") ""))
|
||||||
|
#t))))
|
||||||
(build-system python-build-system)
|
(build-system python-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
`(#:phases
|
`(#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(replace 'check
|
(replace 'check
|
||||||
(lambda _
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
(invoke "pytest"))))))
|
;; Skip orjson, which requires rust to build.
|
||||||
|
(substitute* "tests/test_media_handlers.py"
|
||||||
|
(("== 'CPython") "!= 'CPython"))
|
||||||
|
(add-installed-pythonpath inputs outputs)
|
||||||
|
(invoke "pytest" "--ignore" "falcon"))))))
|
||||||
(propagated-inputs
|
(propagated-inputs
|
||||||
`(("python-mimeparse" ,python-mimeparse)
|
`(("python-mimeparse" ,python-mimeparse)))
|
||||||
("python-six" ,python-six)))
|
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("python-cython" ,python-cython) ;for faster binaries
|
`(("python-cython" ,python-cython) ;for faster binaries
|
||||||
|
("python-mujson" ,python-mujson)
|
||||||
|
("python-msgpack" ,python-msgpack)
|
||||||
("python-pytest" ,python-pytest)
|
("python-pytest" ,python-pytest)
|
||||||
|
("python-pytest-runner" ,python-pytest-runner)
|
||||||
("python-pyyaml" ,python-pyyaml)
|
("python-pyyaml" ,python-pyyaml)
|
||||||
|
("python-rapidjson" ,python-rapidjson)
|
||||||
("python-requests" ,python-requests)
|
("python-requests" ,python-requests)
|
||||||
("python-testtools" ,python-testtools)
|
("python-testtools" ,python-testtools)
|
||||||
("python-jsonschema" ,python-jsonschema)
|
("python-ujson" ,python-ujson)))
|
||||||
("python-msgpack" ,python-msgpack)))
|
|
||||||
(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")
|
||||||
|
@ -267,10 +285,15 @@ classes
|
||||||
@item Compatible with both CPython and PyPy
|
@item Compatible with both CPython and PyPy
|
||||||
@item Cython support for better performance when used with CPython
|
@item Cython support for better performance when used with CPython
|
||||||
@end itemize")
|
@end itemize")
|
||||||
|
(properties `((python2-variant . ,(delay python2-falcon))))
|
||||||
(license license:asl2.0)))
|
(license license:asl2.0)))
|
||||||
|
|
||||||
(define-public python2-falcon
|
(define-public python2-falcon
|
||||||
(package-with-python2 python-falcon))
|
(let ((falcon (package-with-python2 (strip-python2-variant python-falcon))))
|
||||||
|
(package
|
||||||
|
(inherit falcon)
|
||||||
|
(native-inputs
|
||||||
|
(alist-delete "python-rapidjson" (package-native-inputs falcon))))))
|
||||||
|
|
||||||
(define-public python-falcon-cors
|
(define-public python-falcon-cors
|
||||||
(package
|
(package
|
||||||
|
|
Reference in New Issue