From e62b0b3856a1d35afed094a211c858ba1bff0ba0 Mon Sep 17 00:00:00 2001 From: Jonas Heinrich Date: Sun, 17 Jul 2022 20:59:30 +0200 Subject: [PATCH] python310Packages.testcontainers: init at 3.5.0 (#181584) * python310Packages.testcontainers: init at 3.5.0 * Apply suggestions from code review Co-authored-by: Sandro --- .../python-modules/testcontainers/default.nix | 39 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 41 insertions(+) create mode 100644 pkgs/development/python-modules/testcontainers/default.nix diff --git a/pkgs/development/python-modules/testcontainers/default.nix b/pkgs/development/python-modules/testcontainers/default.nix new file mode 100644 index 000000000000..a690be883340 --- /dev/null +++ b/pkgs/development/python-modules/testcontainers/default.nix @@ -0,0 +1,39 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, deprecation +, docker +, wrapt +}: + +buildPythonPackage rec { + pname = "testcontainers"; + version = "3.5.0"; + + src = fetchFromGitHub { + owner = "testcontainers"; + repo = "testcontainers-python"; + rev = "v${version}"; + sha256 = "sha256-uB3MbRVQzbUdZRxkGl635O+K17bkHIGY2JbU8R23Kt0="; + }; + + buildInputs = [ + deprecation + docker + wrapt + ]; + + # Tests require various container and database services running + doCheck = false; + + pythonImportsCheck = [ + "testcontainers" + ]; + + meta = with lib; { + description = "Allows using docker containers for functional and integration testing"; + homepage = "https://github.com/testcontainers/testcontainers-python"; + license = licenses.asl20; + maintainers = with maintainers; [ onny ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 97d877d30844..e4162f94f4df 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -10508,6 +10508,8 @@ in { tesserocr = callPackage ../development/python-modules/tesserocr { }; + testcontainers = callPackage ../development/python-modules/testcontainers { }; + testfixtures = callPackage ../development/python-modules/testfixtures { }; textfsm = callPackage ../development/python-modules/textfsm { };