me
/
guix
Archived
1
0
Fork 0

gnu: python-moto: Update to 2.2.12.

* gnu/packages/python-xyz.scm (python-moto): Update to 2.2.12.
[arguments]: Make some cosmetic changes.
<#:phases>: Don't return #t. Support cross-compilation in
'patch-hardcoded-executable-names. Skip more tests and simplify the custom
'check phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Vinicius Monego 2021-11-05 01:58:35 +00:00 committed by Ludovic Courtès
parent 365260f4cd
commit 7a34e56dc8
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 30 additions and 21 deletions

View File

@ -13353,34 +13353,41 @@ text.")
(define-public python-moto (define-public python-moto
(package (package
(name "python-moto") (name "python-moto")
;; XXX: Use a pre-release for compatibility with latest botocore & friends. (version "2.2.12")
(version "1.3.16.dev134")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (pypi-uri "moto" version)) (uri (pypi-uri "moto" version))
(sha256 (sha256
(base32 (base32
"1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd")))) "0pvay0jp119lzzwf5qj5h6311271yq0w2i6344ds20grpf6g6gz8"))))
(build-system python-build-system) (build-system python-build-system)
(arguments (arguments
`(#:phases (modify-phases %standard-phases `(#:phases
(add-after 'unpack 'patch-hardcoded-executable-names (modify-phases %standard-phases
(lambda _ (add-after 'unpack 'patch-hardcoded-executable-names
(substitute* "moto/batch/models.py" (lambda* (#:key inputs #:allow-other-keys)
(("/bin/sh") (let ((bash-exec (string-append
(which "sh"))) (assoc-ref inputs "bash")
(substitute* (find-files "tests" "\\.py$") "/bin/sh")))
(("#!/bin/bash") (substitute* "moto/batch/models.py"
(string-append "#!" (which "bash")))) (("/bin/sh") bash-exec))
#t)) (substitute* (find-files "tests" "\\.py$")
(replace 'check (("#!/bin/bash") (string-append "#!" bash-exec))))))
(lambda _ (replace 'check
(setenv "PYTHONPATH" (string-append "./build/lib:" (lambda* (#:key inputs outputs #:allow-other-keys)
(getenv "PYTHONPATH"))) (add-installed-pythonpath inputs outputs)
(invoke "pytest" "-vv" "-m" "not network" (invoke "pytest" "-vv" "-m" "not network" "-k"
;; These tests require Docker. (string-append
"-k" "not test_terminate_job \ ;; These tests require Docker.
and not test_invoke_function_from_sqs_exception")))))) "not test_terminate_job"
" and not test_invoke_function_from_sqs_exception"
" and not test_rotate_secret_lambda_invocations"
;; These tests also require the network.
" and not test_put_record_batch_http_destination"
" and not test_put_record_http_destination"
" and not test_dependencies"
" and not test_cancel_running_job"
" and not test_container_overrides")))))))
(native-inputs (native-inputs
`(("python-flask" ,python-flask) `(("python-flask" ,python-flask)
("python-flask-cors" ,python-flask-cors) ("python-flask-cors" ,python-flask-cors)
@ -13388,6 +13395,8 @@ and not test_invoke_function_from_sqs_exception"))))))
("python-parameterized" ,python-parameterized) ("python-parameterized" ,python-parameterized)
("python-pytest" ,python-pytest) ("python-pytest" ,python-pytest)
("python-sure" ,python-sure))) ("python-sure" ,python-sure)))
(inputs
`(("bash" ,bash-minimal)))
(propagated-inputs (propagated-inputs
`(("python-aws-xray-sdk" ,python-aws-xray-sdk) `(("python-aws-xray-sdk" ,python-aws-xray-sdk)
("python-boto" ,python-boto) ("python-boto" ,python-boto)