python311Packages.django-anymail: refactor

This commit is contained in:
Fabian Affolter 2024-03-20 08:31:36 +01:00 committed by GitHub
parent af84f91869
commit b6ab052728
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,13 +1,15 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, requests
, django
, boto3
, buildPythonPackage
, django
, fetchFromGitHub
, hatchling
, python
, mock
, python
, pythonOlder
, requests
, responses
, urllib3
}:
buildPythonPackage rec {
@ -15,9 +17,11 @@ buildPythonPackage rec {
version = "10.3";
pyproject = true;
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "anymail";
repo = pname;
repo = "django-anymail";
rev = "refs/tags/v${version}";
hash = "sha256-5uSpPeXpMkpuzMXzsGE6uQJWP/Dt/oqakB8Xb5G1eZY=";
};
@ -27,8 +31,9 @@ buildPythonPackage rec {
];
propagatedBuildInputs = [
requests
django
requests
urllib3
];
nativeCheckInputs = [
@ -37,7 +42,9 @@ buildPythonPackage rec {
] ++ passthru.optional-dependencies.amazon-ses;
passthru.optional-dependencies = {
amazon-ses = [ boto3 ];
amazon-ses = [
boto3
];
};
checkPhase = ''
@ -46,11 +53,14 @@ buildPythonPackage rec {
runHook postCheck
'';
pythonImportsCheck = [ "anymail" ];
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 ];
};