From 670003530c1b6b990ca06d373396a5a40f6a0901 Mon Sep 17 00:00:00 2001 From: Kerstin Humm Date: Thu, 15 Aug 2024 16:29:55 +0200 Subject: [PATCH] python3Packages.pytest-smtpd: init at 0.1.0 --- .../python-modules/pytest-smtpd/default.nix | 45 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 47 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-smtpd/default.nix diff --git a/pkgs/development/python-modules/pytest-smtpd/default.nix b/pkgs/development/python-modules/pytest-smtpd/default.nix new file mode 100644 index 000000000000..9563441880b9 --- /dev/null +++ b/pkgs/development/python-modules/pytest-smtpd/default.nix @@ -0,0 +1,45 @@ +{ + lib, + buildPythonPackage, + pythonOlder, + fetchFromGitHub, + hatchling, + pytest, + smtpdfix, + pytestCheckHook, +}: + +buildPythonPackage rec { + pname = "pytest-smtpd"; + version = "0.1.0"; + pyproject = true; + + disabled = pythonOlder "3.8"; + + # Pypi tarball doesn't include tests/ + src = fetchFromGitHub { + owner = "bebleo"; + repo = "pytest-smtpd"; + rev = "refs/tags/v${version}"; + hash = "sha256-Vu2D2hfxBYxgXQ4Gjr+jFpac9fjpLL2FftBhnqrcQaA="; + }; + + build-system = [ hatchling ]; + + dependencies = [ + smtpdfix + ]; + + buildInputs = [ pytest ]; + + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "pytest_smtpd" ]; + + meta = with lib; { + description = "Pytest fixture that creates an SMTP server"; + homepage = "https://github.com/bebleo/pytest-smtpd"; + license = licenses.mit; + maintainers = with maintainers; [ erictapen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7cbaa4b090f1..742eff0b79c1 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -12794,6 +12794,8 @@ self: super: with self; { pytest-shutil = callPackage ../development/python-modules/pytest-shutil { }; + pytest-smtpd = callPackage ../development/python-modules/pytest-smtpd { }; + pytest-spec = callPackage ../development/python-modules/pytest-spec { }; python-status = callPackage ../development/python-modules/python-status { };