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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

103 lines
2.0 KiB
Nix
Raw Normal View History

2018-11-29 12:20:46 +00:00
{ lib
, attrs
, botocore
2021-08-19 07:47:30 +00:00
, buildPythonPackage
2018-11-29 12:20:46 +00:00
, click
2021-08-19 07:47:30 +00:00
, fetchFromGitHub
2020-08-26 06:22:12 +00:00
, hypothesis
, inquirer
2018-11-29 12:20:46 +00:00
, jmespath
2020-08-26 06:22:12 +00:00
, mock
, mypy-extensions
2018-11-29 12:20:46 +00:00
, pip
2021-08-19 07:47:30 +00:00
, pytestCheckHook
, pythonOlder
2020-08-26 06:22:12 +00:00
, pyyaml
2021-08-19 07:47:30 +00:00
, requests
2018-11-29 12:20:46 +00:00
, setuptools
, six
2021-08-19 07:47:30 +00:00
, typing
2018-11-29 12:20:46 +00:00
, watchdog
2021-08-19 07:47:30 +00:00
, websocket-client
2020-08-26 06:22:12 +00:00
, wheel
2018-11-29 12:20:46 +00:00
}:
buildPythonPackage rec {
pname = "chalice";
version = "1.26.6";
2018-11-29 12:20:46 +00:00
2021-08-19 07:47:30 +00:00
src = fetchFromGitHub {
owner = "aws";
repo = pname;
rev = version;
sha256 = "sha256-6Y5pJg6N/F97zvkyo4r6MoThi79kI53AvlHNOmOCpFA=";
2018-11-29 12:20:46 +00:00
};
propagatedBuildInputs = [
attrs
botocore
click
inquirer
2018-11-29 12:20:46 +00:00
jmespath
2020-08-26 06:22:12 +00:00
mypy-extensions
2018-11-29 12:20:46 +00:00
pip
2020-08-26 06:22:12 +00:00
pyyaml
2018-11-29 12:20:46 +00:00
setuptools
six
wheel
2021-08-19 07:47:30 +00:00
watchdog
] ++ lib.optionals (pythonOlder "3.7") [
2018-11-29 12:20:46 +00:00
typing
];
2021-08-19 07:47:30 +00:00
checkInputs = [
hypothesis
mock
pytestCheckHook
requests
websocket-client
];
2018-11-29 12:20:46 +00:00
postPatch = ''
sed -i setup.py -e "/pip>=/c\'pip',"
2018-11-29 12:20:46 +00:00
substituteInPlace setup.py \
--replace "typing==3.6.4" "typing" \
--replace "jmespath>=0.9.3,<1.0.0" "jmespath>=0.9.3,<2.0.0"
2018-11-29 12:20:46 +00:00
'';
2021-08-19 07:47:30 +00:00
disabledTestPaths = [
# Don't check the templates and the sample app
"chalice/templates"
"docs/source/samples/todo-app/code/tests/test_db.py"
# Requires credentials
"tests/aws/test_features.py"
# Requires network access
"tests/aws/test_websockets.py"
"tests/integration/test_package.py"
];
disabledTests = [
# Requires network access
"test_update_domain_name_failed"
"test_can_reload_server"
# Content for the tests is missing
"test_can_import_env_vars"
"test_stack_trace_printed_on_error"
# Don't build
"test_can_generate_pipeline_for_all"
"test_build_wheel"
# https://github.com/aws/chalice/issues/1850
"test_resolve_endpoint"
"test_endpoint_from_arn"
2021-08-19 07:47:30 +00:00
];
pythonImportsCheck = [ "chalice" ];
2018-11-29 12:20:46 +00:00
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;
2021-08-19 07:47:30 +00:00
maintainers = with maintainers; [ costrouc ];
2018-11-29 12:20:46 +00:00
};
}