depot/third_party/nixpkgs/pkgs/development/python-modules/django-anymail/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

62 lines
1.2 KiB
Nix

{
lib,
boto3,
buildPythonPackage,
django,
fetchFromGitHub,
hatchling,
mock,
python,
pythonOlder,
requests,
responses,
urllib3,
}:
buildPythonPackage rec {
pname = "django-anymail";
version = "11.0.1";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "anymail";
repo = "django-anymail";
rev = "refs/tags/v${version}";
hash = "sha256-tCGohY/vwdKKOqhFGLJqX+kyl0n3XUJToJMErICGjEw=";
};
nativeBuildInputs = [ hatchling ];
propagatedBuildInputs = [
django
requests
urllib3
];
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";
changelog = "https://github.com/anymail/django-anymail/blob/v${version}/CHANGELOG.rst";
license = licenses.bsd3;
maintainers = with maintainers; [ onny ];
};
}