diff --git a/pkgs/development/python-modules/serverlessrepo/default.nix b/pkgs/development/python-modules/serverlessrepo/default.nix index 2a8267710a09..d3cc7e9c633b 100644 --- a/pkgs/development/python-modules/serverlessrepo/default.nix +++ b/pkgs/development/python-modules/serverlessrepo/default.nix @@ -1,16 +1,20 @@ { lib , buildPythonPackage , fetchPypi -, pytest +, pytestCheckHook , boto3 , six , pyyaml , mock +, pythonOlder }: buildPythonPackage rec { pname = "serverlessrepo"; version = "0.1.10"; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; @@ -23,12 +27,25 @@ buildPythonPackage rec { pyyaml ]; - checkInputs = [ pytest mock ]; + checkInputs = [ + pytestCheckHook + mock + ]; - checkPhase = '' - pytest tests/unit + postPatch = '' + substituteInPlace setup.py \ + --replace "pyyaml~=5.1" "pyyaml" \ + --replace "boto3~=1.9, >=1.9.56" "boto3" ''; + pytestFlagsArray = [ + "tests/unit" + ]; + + pythonImportsCheck = [ + "serverlessrepo" + ]; + meta = with lib; { homepage = "https://github.com/awslabs/aws-serverlessrepo-python"; description = "Helpers for working with the AWS Serverless Application Repository"; @@ -36,7 +53,7 @@ buildPythonPackage rec { A Python library with convenience helpers for working with the AWS Serverless Application Repository. ''; - license = lib.licenses.asl20; + license = licenses.asl20; maintainers = with maintainers; [ dhkl ]; }; } diff --git a/pkgs/development/tools/aws-sam-cli/default.nix b/pkgs/development/tools/aws-sam-cli/default.nix index d38ac9ba88c9..444bc39bddd0 100644 --- a/pkgs/development/tools/aws-sam-cli/default.nix +++ b/pkgs/development/tools/aws-sam-cli/default.nix @@ -5,16 +5,13 @@ python3.pkgs.buildPythonApplication rec { pname = "aws-sam-cli"; - version = "1.36.0"; + version = "1.37.0"; src = python3.pkgs.fetchPypi { inherit pname version; - sha256 = "sha256-GJbBhe1l25ZHGWVu1o2oJvd/BNv8dv7aIYor/ebFl9U="; + hash = "sha256-XE3g2mKwAiaJvi0ShVScnCKrmz7ujaQgOeFXuYwtP4g="; }; - # Tests are not included in the PyPI package - doCheck = false; - propagatedBuildInputs = with python3.pkgs; [ aws-lambda-builders aws-sam-translator @@ -42,18 +39,22 @@ python3.pkgs.buildPythonApplication rec { # fix over-restrictive version bounds postPatch = '' substituteInPlace requirements/base.txt \ + --replace "aws_lambda_builders==" "aws-lambda-builders #" \ --replace "click~=7.1" "click~=8.0" \ - --replace "Flask~=1.1.2" "Flask~=2.0" \ --replace "dateparser~=1.0" "dateparser>=0.7" \ --replace "docker~=4.2.0" "docker>=4.2.0" \ - --replace "requests==" "requests #" \ - --replace "watchdog==" "watchdog #" \ - --replace "aws_lambda_builders==" "aws-lambda-builders #" \ - --replace "typing_extensions==" "typing-extensions #" \ + --replace "Flask~=1.1.2" "Flask~=2.0" \ + --replace "PyYAML~=5.3" "PyYAML" \ --replace "regex==" "regex #" \ - --replace "tzlocal==3.0" "tzlocal" + --replace "requests==" "requests #" \ + --replace "typing_extensions==" "typing-extensions #" \ + --replace "tzlocal==3.0" "tzlocal" \ + --replace "watchdog==" "watchdog #" ''; + # Tests are not included in the PyPI package + doCheck = false; + meta = with lib; { homepage = "https://github.com/awslabs/aws-sam-cli"; description = "CLI tool for local development and testing of Serverless applications";