2022-04-15 01:41:22 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, pythonOlder
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# build-system
|
2023-03-15 16:39:30 +00:00
|
|
|
, setuptools
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# dependencies
|
2020-04-24 23:36:52 +00:00
|
|
|
, boto3
|
|
|
|
, botocore
|
2022-04-15 01:41:22 +00:00
|
|
|
, cryptography
|
2023-11-16 04:20:00 +00:00
|
|
|
, jinja2
|
|
|
|
, python-dateutil
|
|
|
|
, requests
|
|
|
|
, responses
|
|
|
|
, werkzeug
|
|
|
|
, xmltodict
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, aws-xray-sdk
|
|
|
|
, cfn-lint
|
2020-04-24 23:36:52 +00:00
|
|
|
, docker
|
2023-11-16 04:20:00 +00:00
|
|
|
, ecdsa
|
2020-04-24 23:36:52 +00:00
|
|
|
, flask
|
2022-02-10 20:34:41 +00:00
|
|
|
, flask-cors
|
2022-04-15 01:41:22 +00:00
|
|
|
, graphql-core
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsondiff
|
2023-11-16 04:20:00 +00:00
|
|
|
, multipart
|
2022-06-26 10:26:21 +00:00
|
|
|
, openapi-spec-validator
|
2023-11-16 04:20:00 +00:00
|
|
|
, py-partiql-parser
|
2023-03-15 16:39:30 +00:00
|
|
|
, pyparsing
|
2020-04-24 23:36:52 +00:00
|
|
|
, python-jose
|
2022-04-15 01:41:22 +00:00
|
|
|
, pyyaml
|
2020-04-24 23:36:52 +00:00
|
|
|
, sshpubkeys
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, freezegun
|
2021-02-16 17:04:54 +00:00
|
|
|
, pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
, pytest-order
|
2022-02-10 20:34:41 +00:00
|
|
|
, pytest-xdist
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "moto";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "4.2.13";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
2022-04-15 01:41:22 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-Aa72pImnJcjXJb09xvcP8b7a7j4mQXUuS0cf8O3ktNc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-03-15 16:39:30 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
botocore
|
2022-04-15 01:41:22 +00:00
|
|
|
cryptography
|
2020-04-24 23:36:52 +00:00
|
|
|
requests
|
|
|
|
xmltodict
|
2023-11-16 04:20:00 +00:00
|
|
|
werkzeug
|
|
|
|
python-dateutil
|
|
|
|
responses
|
|
|
|
jinja2
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
# non-exhaustive list of extras, that was cobbled together for testing
|
|
|
|
all = [
|
|
|
|
aws-xray-sdk
|
|
|
|
cfn-lint
|
|
|
|
docker
|
|
|
|
ecdsa
|
|
|
|
flask
|
|
|
|
flask-cors
|
|
|
|
graphql-core
|
|
|
|
jsondiff
|
|
|
|
multipart
|
|
|
|
openapi-spec-validator
|
|
|
|
py-partiql-parser
|
|
|
|
pyparsing
|
|
|
|
python-jose
|
|
|
|
pyyaml
|
|
|
|
setuptools
|
|
|
|
sshpubkeys
|
|
|
|
] ++ python-jose.optional-dependencies.cryptography;
|
|
|
|
};
|
|
|
|
|
2023-08-22 20:05:09 +00:00
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-02-10 20:34:41 +00:00
|
|
|
freezegun
|
2022-04-15 01:41:22 +00:00
|
|
|
pytestCheckHook
|
2024-01-02 11:29:13 +00:00
|
|
|
pytest-order
|
2023-11-16 04:20:00 +00:00
|
|
|
pytest-xdist
|
|
|
|
] ++ passthru.optional-dependencies.all;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Some tests depend on AWS credentials environment variables to be set.
|
|
|
|
env.AWS_ACCESS_KEY_ID = "ak";
|
|
|
|
env.AWS_SECRET_ACCESS_KEY = "sk";
|
|
|
|
|
2021-02-16 17:04:54 +00:00
|
|
|
pytestFlagsArray = [
|
2023-11-16 04:20:00 +00:00
|
|
|
"-m" "'not network and not requires_docker'"
|
2022-04-15 01:41:22 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Matches upstream configuration, presumably due to expensive setup/teardown.
|
|
|
|
"--dist" "loadscope"
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Fails at local name resolution
|
|
|
|
"--deselect=tests/test_s3/test_multiple_accounts_server.py::TestAccountIdResolution::test_with_custom_request_header"
|
|
|
|
"--deselect=tests/test_s3/test_server.py::test_s3_server_post_cors_multiple_origins"
|
2024-01-13 08:15:51 +00:00
|
|
|
"--deselect=tests/test_s3/test_s3_file_handles.py::TestS3FileHandleClosuresUsingMocks::test_create_multipart"
|
|
|
|
"--deselect=tests/test_core/test_responses_module.py::TestResponsesMockWithPassThru::test_aws_and_http_requests"
|
|
|
|
"--deselect=tests/test_core/test_responses_module.py::TestResponsesMockWithPassThru::test_http_requests"
|
2022-06-26 10:26:21 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Fails at resolving google.com
|
|
|
|
"--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_http_destination"
|
|
|
|
"--deselect=tests/test_firehose/test_firehose_put.py::test_put_record_batch_http_destination"
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Download recordings returns faulty JSON
|
|
|
|
"--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_ec2_instance_creation_recording_on"
|
|
|
|
"--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_ec2_instance_creation__recording_off"
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Connection Reset by Peer, when connecting to localhost:5678
|
|
|
|
"--deselect=tests/test_moto_api/recorder/test_recorder.py::TestRecorder::test_replay"
|
2022-04-27 09:35:20 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
# Flaky under parallel execution
|
|
|
|
"--deselect=tests/test_cloudformation/test_server.py::test_cloudformation_server_get"
|
|
|
|
"--deselect=tests/test_core/test_moto_api.py::TestModelDataResetForClassDecorator::test_should_find_bucket"
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# AssertionError: assert ResourceWarning not in [<class 'ResourceWarning'>, <class 'ResourceWarning'>]
|
|
|
|
"--deselect=ests/test_s3/test_s3_file_handles.py::TestS3FileHandleClosuresUsingMocks::test_delete_object_with_version"
|
2022-04-15 01:41:22 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = [
|
2024-01-02 11:29:13 +00:00
|
|
|
# Flaky under parallel execution, Connection Reset errors to localhost.
|
|
|
|
"tests/test_moto_api/recorder/test_recorder.py"
|
|
|
|
|
|
|
|
# Flaky under parallel execution
|
|
|
|
"tests/test_resourcegroupstaggingapi/*.py"
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2022-04-15 01:41:22 +00:00
|
|
|
# Tries to access the network
|
|
|
|
"tests/test_batch/test_batch_jobs.py"
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
# Threading tests regularly blocks test execution
|
|
|
|
"tests/test_utilities/test_threaded_server.py"
|
|
|
|
"tests/test_s3/test_s3_bucket_policy.py"
|
2021-02-16 17:04:54 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Allows your tests to easily mock out AWS Services";
|
2024-01-13 08:15:51 +00:00
|
|
|
homepage = "https://github.com/getmoto/moto";
|
2023-03-15 16:39:30 +00:00
|
|
|
changelog = "https://github.com/getmoto/moto/blob/${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
maintainers = [ ];
|
|
|
|
};
|
|
|
|
}
|