about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFabian Affolter <fabian@affolter-engineering.ch>2024-03-20 10:47:18 +0100
committerGitHub <noreply@github.com>2024-03-20 10:47:18 +0100
commit14288f00a0ab18bae259aa64f0203fedf516c307 (patch)
tree1ace366074675cf59ca734d250e55fbc927d76a0
parent498ef3b413c37e1620f4168c8b28f4587c185258 (diff)
parentac480bad28b90100de520c0c6787c40371b8cfd1 (diff)
Merge pull request #297016 from Stunkymonkey/python-whoosh-normalize
python312Packages.whoosh: normalize pname
-rw-r--r--pkgs/development/python-modules/whoosh/default.nix49
1 files changed, 35 insertions, 14 deletions
diff --git a/pkgs/development/python-modules/whoosh/default.nix b/pkgs/development/python-modules/whoosh/default.nix
index 10053bc27918e..52831486f2b70 100644
--- a/pkgs/development/python-modules/whoosh/default.nix
+++ b/pkgs/development/python-modules/whoosh/default.nix
@@ -1,30 +1,51 @@
-{ lib, buildPythonPackage, fetchPypi, pytest }:
+{ lib
+, buildPythonPackage
+, fetchPypi
+, pytestCheckHook
+, pythonOlder
+, setuptools
+}:
 
 buildPythonPackage rec {
-  pname = "Whoosh";
+  pname = "whoosh";
   version = "2.7.4";
+  pyproject = true;
+
+  disabled = pythonOlder "3.7";
+
   src = fetchPypi {
-    inherit pname version;
-    sha256 = "10qsqdjpbc85fykc1vgcs8xwbgn4l2l52c8d83xf1q59pwyn79bw";
+    pname = "Whoosh";
+    inherit version;
+    hash = "sha256-fKVjPb+p4OD6QA0xUaigxL7FO9Ls7cCmdwWxdWXDGoM=";
   };
 
-  nativeCheckInputs = [ pytest ];
+  nativeBuildInputs = [
+    setuptools
+  ];
+
+  nativeCheckInputs = [
+    pytestCheckHook
+  ];
 
   # Wrong encoding
   postPatch = ''
     rm tests/test_reading.py
-    substituteInPlace setup.cfg --replace "[pytest]" "[tool:pytest]"
-  '';
-  checkPhase =  ''
-    # FIXME: test_minimize_dfa fails on python 3.6
-    py.test -k "not test_timelimit and not test_minimize_dfa"
+    substituteInPlace setup.cfg \
+      --replace-fail "[pytest]" "[tool:pytest]"
   '';
 
+  pythonImportsCheck = [
+    "whoosh"
+  ];
+
+  disabledTests = [
+    "test_minimize_dfa"
+  ];
+
   meta = with lib; {
-    description = "Fast, pure-Python full text indexing, search, and spell
-checking library.";
-    homepage    = "https://bitbucket.org/mchaput/whoosh";
-    license     = licenses.bsd2;
+    description = "Fast, pure-Python full text indexing, search, and spell checking library";
+    homepage = "https://github.com/mchaput/whoosh";
+    license = licenses.bsd2;
     maintainers = with maintainers; [ ];
   };
 }