From b6ab052728de1a7d24164ce8adfb721a7fb5aa02 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Wed, 20 Mar 2024 08:31:36 +0100 Subject: [PATCH] python311Packages.django-anymail: refactor --- .../python-modules/django-anymail/default.nix | 28 +++++++++++++------ 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/django-anymail/default.nix b/pkgs/development/python-modules/django-anymail/default.nix index 362b4e3af915..1e619035bd05 100644 --- a/pkgs/development/python-modules/django-anymail/default.nix +++ b/pkgs/development/python-modules/django-anymail/default.nix @@ -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 ]; };