nixpkgs/pkgs/development/python-modules/chalice/default.nix
2020-12-22 18:39:58 -08:00

70 lines
1.2 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, attrs
, botocore
, click
, enum-compat
, hypothesis
, jmespath
, mock
, mypy-extensions
, pip
, pytest
, pyyaml
, setuptools
, six
, typing
, watchdog
, wheel
}:
buildPythonPackage rec {
pname = "chalice";
version = "1.21.7";
src = fetchPypi {
inherit pname version;
sha256 = "22512bccb9b881b8d5a33bd45c7ad539dee60f2f8685a5ed8afd5000a962b0f8";
};
checkInputs = [ watchdog pytest hypothesis mock ];
propagatedBuildInputs = [
attrs
botocore
click
enum-compat
jmespath
mypy-extensions
pip
pyyaml
setuptools
six
wheel
] ++ lib.optionals (pythonOlder "3.5") [
typing
];
# conftest.py not included with pypi release
doCheck = false;
postPatch = ''
sed -i setup.py -e "/pip>=/c\'pip',"
substituteInPlace setup.py \
--replace 'typing==3.6.4' 'typing' \
--replace 'attrs>=19.3.0,<20.3.0' 'attrs'
'';
checkPhase = ''
pytest tests
'';
meta = with lib; {
description = "Python Serverless Microframework for AWS";
homepage = "https://github.com/aws/chalice";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};
}