3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/python-modules/chalice/default.nix

72 lines
1.3 KiB
Nix
Raw Normal View History

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