2022-09-09 14:08:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, six
|
|
|
|
, requests
|
|
|
|
, django
|
|
|
|
, boto3
|
2024-01-02 11:29:13 +00:00
|
|
|
, hatchling
|
2022-09-09 14:08:57 +00:00
|
|
|
, python
|
|
|
|
, mock
|
2024-01-02 11:29:13 +00:00
|
|
|
, responses
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "django-anymail";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "10.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "anymail";
|
|
|
|
repo = pname;
|
2022-05-18 14:49:53 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-unmbYQFLeqfqE1uFLMPLUad1UqA+sgbTzwRfpRhM3ik=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
hatchling
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
requests
|
|
|
|
django
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-09-09 14:08:57 +00:00
|
|
|
mock
|
2024-01-02 11:29:13 +00:00
|
|
|
responses
|
|
|
|
] ++ passthru.optional-dependencies.amazon-ses;
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
amazon-ses = [ boto3 ];
|
|
|
|
};
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
checkPhase = ''
|
|
|
|
runHook preCheck
|
|
|
|
CONTINUOUS_INTEGRATION=1 python runtests.py
|
|
|
|
runHook postCheck
|
|
|
|
'';
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
pythonImportsCheck = [ "anymail" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Django email backends and webhooks for Mailgun";
|
|
|
|
homepage = "https://github.com/anymail/django-anymail";
|
|
|
|
license = licenses.bsd3;
|
2022-09-09 14:08:57 +00:00
|
|
|
maintainers = with maintainers; [ onny ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|