diff options
author | Marius Bakke <mbakke@fastmail.com> | 2019-08-19 15:35:01 +0200 |
---|---|---|
committer | Marius Bakke <marius@gnu.org> | 2020-11-21 01:21:32 +0100 |
commit | beba9ff82123c4a82721b2ed14df2c7576e22e85 (patch) | |
tree | 97889f62c7f13df91677fc3aacf54b87acc768bc /gnu/packages/python-xyz.scm | |
parent | 160c6af5ce661bc6dcb7bf849cf8b7d95b18a594 (diff) | |
download | guix-beba9ff82123c4a82721b2ed14df2c7576e22e85.tar.gz |
gnu: Add python-moto.
* gnu/packages/python-xyz.scm (python-moto): New public variable.
Diffstat (limited to 'gnu/packages/python-xyz.scm')
-rw-r--r-- | gnu/packages/python-xyz.scm | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 718dcad8df..d50c5d57a5 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -123,6 +123,7 @@ #:use-module (gnu packages crypto) #:use-module (gnu packages databases) #:use-module (gnu packages dbm) + #:use-module (gnu packages docker) #:use-module (gnu packages enchant) #:use-module (gnu packages file) #:use-module (gnu packages fontutils) @@ -10868,6 +10869,73 @@ text.") (define-public python2-colorama (package-with-python2 python-colorama)) +(define-public python-moto + (package + (name "python-moto") + ;; XXX: Use a pre-release for compatibility with latest botocore & friends. + (version "1.3.16.dev134") + (source (origin + (method url-fetch) + (uri (pypi-uri "moto" version)) + (sha256 + (base32 + "1pix0c7zszjwzfy88n1rpih9vkdm25nqcvz93z850xvgwb4v81bd")))) + (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-after 'unpack 'patch-hardcoded-executable-names + (lambda _ + (substitute* "moto/batch/models.py" + (("/bin/sh") + (which "sh"))) + (substitute* (find-files "tests" "\\.py$") + (("#!/bin/bash") + (string-append "#!" (which "bash")))) + #t)) + (replace 'check + (lambda _ + (setenv "PYTHONPATH" (string-append "./build/lib:" + (getenv "PYTHONPATH"))) + (invoke "pytest" "-vv" "-m" "not network" + ;; These tests require Docker. + "-k" "not test_terminate_job \ +and not test_invoke_function_from_sqs_exception")))))) + (native-inputs + `(("python-flask" ,python-flask) + ("python-flask-cors" ,python-flask-cors) + ("python-freezegun" ,python-freezegun) + ("python-parameterized" ,python-parameterized) + ("python-pytest" ,python-pytest) + ("python-sure" ,python-sure))) + (propagated-inputs + `(("python-aws-xray-sdk" ,python-aws-xray-sdk) + ("python-boto" ,python-boto) + ("python-boto3" ,python-boto3) + ("python-botocore" ,python-botocore) + ("python-cfn-lint" ,python-cfn-lint) + ("python-cryptography" ,python-cryptography) + ("python-dateutil" ,python-dateutil) + ("python-docker" ,python-docker) + ("python-idna" ,python-idna) + ("python-jinja2" ,python-jinja2) + ("python-jose" ,python-jose) + ("python-jsondiff" ,python-jsondiff) + ("python-mock" ,python-mock) + ("python-pytz" ,python-pytz) + ("python-pyyaml" ,python-pyyaml) + ("python-requests" ,python-requests) + ("python-responses" ,python-responses) + ("python-six" ,python-six) + ("python-sshpubkeys" ,python-sshpubkeys) + ("python-werkzeug" ,python-werkzeug) + ("python-xmltodict" ,python-xmltodict))) + (home-page "https://github.com/spulec/moto") + (synopsis "Mock out the boto library") + (description + "@code{moto} is a library designed to easily mock out the +@code{boto} library.") + (license license:asl2.0))) + (define-public python-rsa (package (name "python-rsa") |