depot/third_party/nixpkgs/pkgs/development/python-modules/notifications-python-client/default.nix
Default email 3cbfd2b52c Project import generated by Copybara.
GitOrigin-RevId: 395879c28386e1abf20c7ecacd45880759548391
2021-12-18 20:06:50 -05:00

58 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, docopt
, fetchFromGitHub
, freezegun
, mock
, pyjwt
, pytest-mock
, pytestCheckHook
, pythonOlder
, requests
, requests-mock
}:
buildPythonPackage rec {
pname = "notifications-python-client";
version = "6.3.0";
format = "setuptools";
disabled = pythonOlder "3.8";
src = fetchFromGitHub {
owner = "alphagov";
repo = pname;
rev = version;
sha256 = "sha256-pfOTVgsfXJQ9GIGowra3RAwxCri76RgnA9iyWbjomCk=";
};
propagatedBuildInputs = [
docopt
pyjwt
requests
];
checkInputs = [
freezegun
mock
pytest-mock
pytestCheckHook
requests-mock
];
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
'';
pythonImportsCheck = [
"notifications_python_client"
];
meta = with lib; {
description = "Python client for the GOV.UK Notify API";
homepage = "https://github.com/alphagov/notifications-python-client";
license = with licenses; [ mit ];
maintainers = with maintainers; [ fab ];
};
}