Merge pull request #135399 from fabaff/tests-aws-sam-translator
This commit is contained in:
commit
b08a21e39d
1 changed files with 31 additions and 11 deletions
|
@ -1,10 +1,14 @@
|
||||||
{ lib
|
{ lib
|
||||||
, buildPythonPackage
|
|
||||||
, fetchPypi
|
|
||||||
, pythonOlder
|
|
||||||
, boto3
|
, boto3
|
||||||
|
, buildPythonPackage
|
||||||
, enum34
|
, enum34
|
||||||
|
, fetchFromGitHub
|
||||||
, jsonschema
|
, jsonschema
|
||||||
|
, mock
|
||||||
|
, parameterized
|
||||||
|
, pytestCheckHook
|
||||||
|
, pythonOlder
|
||||||
|
, pyyaml
|
||||||
, six
|
, six
|
||||||
}:
|
}:
|
||||||
|
|
||||||
|
@ -12,23 +16,39 @@ buildPythonPackage rec {
|
||||||
pname = "aws-sam-translator";
|
pname = "aws-sam-translator";
|
||||||
version = "1.38.0";
|
version = "1.38.0";
|
||||||
|
|
||||||
src = fetchPypi {
|
src = fetchFromGitHub {
|
||||||
inherit pname version;
|
owner = "aws";
|
||||||
sha256 = "sha256-Dsrdqc9asjGPV/ElMYGiFR5MU8010hcXqSPAdaWmXLY=";
|
repo = "serverless-application-model";
|
||||||
|
rev = "v${version}";
|
||||||
|
sha256 = "0nn9jfqz13kzmxm0r9vy24p8sqxv3mrm5d3lx7ah6rc581q8nv1k";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Tests are not included in the PyPI package
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
boto3
|
boto3
|
||||||
jsonschema
|
jsonschema
|
||||||
six
|
six
|
||||||
] ++ lib.optionals (pythonOlder "3.4") [ enum34 ];
|
] ++ lib.optionals (pythonOlder "3.4") [
|
||||||
|
enum34
|
||||||
|
];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
substituteInPlace pytest.ini \
|
||||||
|
--replace " --cov samtranslator --cov-report term-missing --cov-fail-under 95" ""
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs = [
|
||||||
|
mock
|
||||||
|
parameterized
|
||||||
|
pytestCheckHook
|
||||||
|
pyyaml
|
||||||
|
];
|
||||||
|
|
||||||
|
pythonImportsCheck = [ "samtranslator" ];
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/awslabs/serverless-application-model";
|
|
||||||
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
description = "Python library to transform SAM templates into AWS CloudFormation templates";
|
||||||
|
homepage = "https://github.com/awslabs/serverless-application-model";
|
||||||
license = licenses.asl20;
|
license = licenses.asl20;
|
||||||
|
maintainers = with maintainers; [ ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue