depot/third_party/nixpkgs/pkgs/development/python-modules/django-anymail/default.nix
Default email e7ec2969af Project import generated by Copybara.
GitOrigin-RevId: 9b19f5e77dd906cb52dade0b7bd280339d2a1f3d
2024-01-13 09:15:51 +01:00

57 lines
1 KiB
Nix

{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, django
, boto3
, hatchling
, python
, mock
, responses
}:
buildPythonPackage rec {
pname = "django-anymail";
version = "10.2";
pyproject = true;
src = fetchFromGitHub {
owner = "anymail";
repo = pname;
rev = "refs/tags/v${version}";
hash = "sha256-k4C82OYm2SdjxeLScrkkitumjYgWkMNFlNeGW+C1Z8o=";
};
nativeBuildInputs = [
hatchling
];
propagatedBuildInputs = [
requests
django
];
nativeCheckInputs = [
mock
responses
] ++ passthru.optional-dependencies.amazon-ses;
passthru.optional-dependencies = {
amazon-ses = [ boto3 ];
};
checkPhase = ''
runHook preCheck
CONTINUOUS_INTEGRATION=1 ${python.interpreter} runtests.py
runHook postCheck
'';
pythonImportsCheck = [ "anymail" ];
meta = with lib; {
description = "Django email backends and webhooks for Mailgun";
homepage = "https://github.com/anymail/django-anymail";
license = licenses.bsd3;
maintainers = with maintainers; [ onny ];
};
}