2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, boto3
|
2021-08-25 08:27:29 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2020-04-24 23:36:52 +00:00
|
|
|
, jsonschema
|
2021-08-25 08:27:29 +00:00
|
|
|
, mock
|
|
|
|
, parameterized
|
2023-01-20 10:41:00 +00:00
|
|
|
, pydantic
|
2022-07-14 12:49:19 +00:00
|
|
|
, pytest-env
|
2023-01-20 10:41:00 +00:00
|
|
|
, pytest-rerunfailures
|
|
|
|
, pytest-xdist
|
2021-08-25 08:27:29 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2023-01-20 10:41:00 +00:00
|
|
|
, typing-extensions
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aws-sam-translator";
|
2023-01-20 10:41:00 +00:00
|
|
|
version = "1.55.0";
|
2022-02-10 20:34:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-08-25 08:27:29 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "aws";
|
|
|
|
repo = "serverless-application-model";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-01-20 10:41:00 +00:00
|
|
|
sha256 = "sha256-YDqdd4zKInttHDl04kvAgHKtc1vBryW12QfE0wiLU54=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
boto3
|
|
|
|
jsonschema
|
2023-01-20 10:41:00 +00:00
|
|
|
pydantic
|
|
|
|
typing-extensions
|
2021-08-25 08:27:29 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
2022-02-10 20:34:41 +00:00
|
|
|
substituteInPlace requirements/base.txt \
|
|
|
|
--replace "jsonschema~=3.2" "jsonschema>=3.2"
|
2021-08-25 08:27:29 +00:00
|
|
|
substituteInPlace pytest.ini \
|
|
|
|
--replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
|
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-08-25 08:27:29 +00:00
|
|
|
mock
|
|
|
|
parameterized
|
2022-07-14 12:49:19 +00:00
|
|
|
pytest-env
|
2023-01-20 10:41:00 +00:00
|
|
|
pytest-rerunfailures
|
|
|
|
pytest-xdist
|
2021-08-25 08:27:29 +00:00
|
|
|
pytestCheckHook
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Expected 7 errors, found 9:
|
|
|
|
"test_errors_13_error_definitionuri"
|
|
|
|
];
|
|
|
|
|
2023-01-20 10:41:00 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
# samtranslator.translator.arn_generator.NoRegionFound: AWS Region cannot be found
|
|
|
|
"--deselect tests/plugins/application/test_serverless_app_plugin.py::TestServerlessAppPlugin_on_before_transform_template_translate::test_sar_success_one_app"
|
|
|
|
"--deselect tests/plugins/application/test_serverless_app_plugin.py::TestServerlessAppPlugin_on_before_transform_template_translate::test_sar_throttling_doesnt_stop_processing"
|
|
|
|
"--deselect tests/plugins/application/test_serverless_app_plugin.py::TestServerlessAppPlugin_on_before_transform_template_translate::test_sleep_between_sar_checks"
|
|
|
|
"--deselect tests/plugins/application/test_serverless_app_plugin.py::TestServerlessAppPlugin_on_before_transform_template_translate::test_unexpected_sar_error_stops_processing"
|
|
|
|
"--deselect tests/plugins/application/test_serverless_app_plugin.py::TestServerlessAppPlugin_on_before_and_on_after_transform_template::test_time_limit_exceeds_between_combined_sar_calls"
|
|
|
|
"--deselect tests/unit/test_region_configuration.py::TestRegionConfiguration::test_is_service_supported_positive_4_ec2"
|
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"samtranslator"
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-02-13 14:23:35 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
2021-08-25 08:27:29 +00:00
|
|
|
homepage = "https://github.com/awslabs/serverless-application-model";
|
2021-02-13 14:23:35 +00:00
|
|
|
license = licenses.asl20;
|
2021-08-25 08:27:29 +00:00
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|