diff --git a/pkgs/development/python-modules/django-anymail/default.nix b/pkgs/development/python-modules/django-anymail/default.nix index a4944b830d23..572df3948186 100644 --- a/pkgs/development/python-modules/django-anymail/default.nix +++ b/pkgs/development/python-modules/django-anymail/default.nix @@ -5,16 +5,17 @@ , requests , django , boto3 +, hatchling , python , mock -, pytestCheckHook -, pytest-django +, responses }: buildPythonPackage rec { pname = "django-anymail"; version = "10.1"; - format = "setuptools"; + + pyproject = true; src = fetchFromGitHub { owner = "anymail"; @@ -23,29 +24,32 @@ buildPythonPackage rec { hash = "sha256-unmbYQFLeqfqE1uFLMPLUad1UqA+sgbTzwRfpRhM3ik="; }; + nativeBuildInputs = [ + hatchling + ]; + propagatedBuildInputs = [ - six requests django - boto3 ]; nativeCheckInputs = [ - pytestCheckHook - pytest-django mock - ]; + responses + ] ++ passthru.optional-dependencies.amazon-ses; - disabledTests = [ - # Require networking - "test_debug_logging" - "test_no_debug_logging" - ]; + passthru.optional-dependencies = { + amazon-ses = [ boto3 ]; + }; + + checkPhase = '' + runHook preCheck + CONTINUOUS_INTEGRATION=1 python runtests.py + runHook postCheck + ''; pythonImportsCheck = [ "anymail" ]; - DJANGO_SETTINGS_MODULE = "tests.test_settings.settings_3_2"; - meta = with lib; { description = "Django email backends and webhooks for Mailgun"; homepage = "https://github.com/anymail/django-anymail";