3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/moto/default.nix

93 lines
2 KiB
Nix
Raw Normal View History

2019-08-15 11:18:16 +01:00
{ lib, buildPythonPackage, fetchPypi, isPy27, fetchpatch
2019-07-24 00:00:32 +01:00
, aws-xray-sdk
, backports_tempfile
, boto
, boto3
, botocore
, cfn-lint
, docker
, flask
, freezegun
, jinja2
, jsondiff
, mock
, nose
, pyaml
, python-jose
, pytz
, requests
, responses
, six
, sshpubkeys
, sure
, werkzeug
, xmltodict
2020-01-03 16:48:15 +00:00
, parameterized
2019-07-24 00:00:32 +01:00
}:
2017-09-15 14:15:54 +01:00
buildPythonPackage rec {
pname = "moto";
2020-01-03 16:48:15 +00:00
version = "1.3.14";
2017-12-30 11:24:45 +00:00
2017-09-15 14:15:54 +01:00
src = fetchPypi {
inherit pname version;
2020-01-03 16:48:15 +00:00
sha256 = "0fm09074qic24h8rw9a0paklygyb7xd0ch4890y4v8lj2pnsxbkr";
2017-09-15 14:15:54 +01:00
};
2018-04-07 11:25:04 +01:00
postPatch = ''
substituteInPlace setup.py \
2019-07-24 00:00:32 +01:00
--replace "jsondiff==1.1.2" "jsondiff~=1.1"
sed -i '/datetime/d' setup.py # should be taken care of by std library
2018-04-07 11:25:04 +01:00
'';
2017-09-15 14:15:54 +01:00
propagatedBuildInputs = [
2017-12-30 11:24:45 +00:00
aws-xray-sdk
2017-09-15 14:15:54 +01:00
boto
2017-12-30 11:24:45 +00:00
boto3
2019-07-24 00:00:32 +01:00
botocore
2019-05-01 09:59:56 +01:00
cfn-lint
2019-07-24 00:00:32 +01:00
docker
flask # required for server
2017-09-15 14:15:54 +01:00
jinja2
2019-07-24 00:00:32 +01:00
jsondiff
2017-12-30 11:24:45 +00:00
mock
pyaml
2018-08-30 18:09:45 +01:00
python-jose
2019-07-24 00:00:32 +01:00
pytz
six
requests
responses
sshpubkeys
werkzeug
xmltodict
] ++ lib.optionals isPy27 [ backports_tempfile ];
2017-09-15 14:15:54 +01:00
2020-01-03 16:48:15 +00:00
checkInputs = [ boto3 freezegun nose sure parameterized ];
2017-09-15 14:15:54 +01:00
2020-01-03 16:48:15 +00:00
checkPhase = ''
nosetests -v ./tests/ \
-e test_invoke_function_from_sns \
-e test_invoke_requestresponse_function \
-e test_context_manager \
-e test_decorator_start_and_stop \
-e test_invoke_event_function \
-e test_invoke_function_from_dynamodb \
-e test_invoke_function_from_sqs \
-e test_invoke_lambda_error \
-e test_invoke_async_function \
-e test_passthrough_requests
'';
2017-09-15 14:15:54 +01:00
2020-02-08 15:53:07 +00:00
# Disabling because of 20 failing tests due to https://github.com/spulec/moto/issues/2728
# We should enable these as soon as possible again though. Note the issue
# is unrelated to the docutils 0.16 bump.
doCheck = false;
2019-07-24 00:00:32 +01:00
meta = with lib; {
2019-07-25 09:47:10 +01:00
description = "Allows your tests to easily mock out AWS Services";
homepage = "https://github.com/spulec/moto";
2019-07-24 00:00:32 +01:00
license = licenses.asl20;
maintainers = [ ];
};
2017-09-15 14:15:54 +01:00
}