eb2be1102c
eg: python3.12-aws-sam-translator> File "/nix/store/jzba2jjz0l3222pry5mf6nyflbwgpd32-python3.12-python-dateutil-2.8.2/lib/python3.12/site-packages/dateutil/tz/__init__.py", line 2, in <module> python3.12-aws-sam-translator> from .tz import * python3.12-aws-sam-translator> File "/nix/store/jzba2jjz0l3222pry5mf6nyflbwgpd32-python3.12-python-dateutil-2.8.2/lib/python3.12/site-packages/dateutil/tz/tz.py", line 37, in <module> python3.12-aws-sam-translator> EPOCH = datetime.datetime.utcfromtimestamp(0) python3.12-aws-sam-translator> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ python3.12-aws-sam-translator> DeprecationWarning: datetime.datetime.utcfromtimestamp() is deprecated and scheduled for removal in a future version. Use timezone-aware objects to represent datetimes in UTC: datetime.datetime.fromtimestamp(timestamp, datetime.UTC). python3.12-aws-sam-translator>
95 lines
2.1 KiB
Nix
95 lines
2.1 KiB
Nix
{ lib
|
|
, boto3
|
|
, buildPythonPackage
|
|
, fetchFromGitHub
|
|
, jsonschema
|
|
, parameterized
|
|
, pydantic
|
|
, pytest-env
|
|
, pytest-rerunfailures
|
|
, pytest-xdist
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
, pyyaml
|
|
, typing-extensions
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "aws-sam-translator";
|
|
version = "1.82.0";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "aws";
|
|
repo = "serverless-application-model";
|
|
rev = "refs/tags/v${version}";
|
|
hash = "sha256-xAbFF4bKHFv5YAOlMA28lW1Xc37xV83X4r19MdubvFs=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# don't try to use --cov or fail on new warnings
|
|
rm pytest.ini
|
|
'';
|
|
|
|
propagatedBuildInputs = [
|
|
boto3
|
|
jsonschema
|
|
pydantic
|
|
typing-extensions
|
|
];
|
|
|
|
nativeCheckInputs = [
|
|
parameterized
|
|
pytest-env
|
|
pytest-rerunfailures
|
|
pytest-xdist
|
|
pytestCheckHook
|
|
pyyaml
|
|
];
|
|
|
|
preCheck = ''
|
|
export AWS_DEFAULT_REGION=us-east-1
|
|
'';
|
|
|
|
pytestFlagsArray = [
|
|
"tests"
|
|
''-m "not slow"''
|
|
];
|
|
|
|
disabledTests = [
|
|
# urllib3 2.0 compat
|
|
"test_plugin_accepts_different_sar_client"
|
|
"test_plugin_accepts_flags"
|
|
"test_plugin_accepts_parameters"
|
|
"test_plugin_default_values"
|
|
"test_plugin_invalid_configuration_raises_exception"
|
|
"test_plugin_must_setup_correct_name"
|
|
"test_must_process_applications"
|
|
"test_must_process_applications_validate"
|
|
"test_process_invalid_applications"
|
|
"test_process_invalid_applications_validate"
|
|
"test_resolve_intrinsics"
|
|
"test_sar_service_calls"
|
|
"test_sar_success_one_app"
|
|
"test_sar_throttling_doesnt_stop_processing"
|
|
"test_sleep_between_sar_checks"
|
|
"test_unexpected_sar_error_stops_processing"
|
|
];
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
pythonImportsCheck = [
|
|
"samtranslator"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
|
homepage = "https://github.com/aws/serverless-application-model";
|
|
changelog = "https://github.com/aws/serverless-application-model/releases/tag/v${version}";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|