about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/sure/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/sure/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/sure/default.nix51
1 files changed, 51 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/sure/default.nix b/nixpkgs/pkgs/development/python-modules/sure/default.nix
new file mode 100644
index 000000000000..9d16cd48af4c
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/sure/default.nix
@@ -0,0 +1,51 @@
+{ lib
+, buildPythonPackage
+, fetchPypi
+, nose
+, mock
+, six
+, isPyPy
+, pythonOlder
+}:
+
+buildPythonPackage rec {
+  pname = "sure";
+  version = "2.0.1";
+  format = "setuptools";
+
+  disabled = isPyPy;
+
+  src = fetchPypi {
+    inherit pname version;
+    sha256 = "sha256-yPxvq8Dn9phO6ruUJUDkVkblvvC7mf5Z4C2mNOTUuco=";
+  };
+
+  postPatch = ''
+    substituteInPlace setup.cfg \
+      --replace "rednose = 1" ""
+  '';
+
+  propagatedBuildInputs = [
+    mock
+    six
+  ];
+
+  doCheck = pythonOlder "3.12"; # nose requires imp module
+
+  nativeCheckInputs = [
+    nose
+  ];
+
+  pythonImportsCheck = [
+    "sure"
+  ];
+
+  meta = with lib; {
+    description = "Utility belt for automated testing";
+    mainProgram = "sure";
+    homepage = "https://sure.readthedocs.io/";
+    changelog = "https://github.com/gabrielfalcao/sure/blob/v${version}/CHANGELOG.md";
+    license = licenses.gpl3Plus;
+    maintainers = with maintainers; [ ];
+  };
+}