nixpkgs/pkgs/development/python-modules/chalice/default.nix

70 lines
1.2 KiB
Nix
Raw Normal View History

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