about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/wordfreq/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/wordfreq/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/wordfreq/default.nix35
1 files changed, 20 insertions, 15 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/wordfreq/default.nix b/nixpkgs/pkgs/development/python-modules/wordfreq/default.nix
index d687ffd2d0b9..6aa8599653b1 100644
--- a/nixpkgs/pkgs/development/python-modules/wordfreq/default.nix
+++ b/nixpkgs/pkgs/development/python-modules/wordfreq/default.nix
@@ -6,38 +6,43 @@
 , msgpack
 , mecab-python3
 , jieba
-, pytest
-, pythonOlder
+, pytestCheckHook
+, isPy27
 , fetchFromGitHub
 }:
 
 buildPythonPackage rec {
   pname = "wordfreq";
-  version = "2.3.2";
-  disabled = pythonOlder "3";
+  version = "2.5";
+  disabled = isPy27;
 
    src = fetchFromGitHub {
     owner = "LuminosoInsight";
     repo = "wordfreq";
-    # upstream don't tag by version
     rev = "v${version}";
-    sha256 = "078657iiksrqzcc2wvwhiilf3xxq5vlinsv0kz03qzqr1qyvbmas";
+    sha256 = "09wzraddbdw3781pk2sxlz8knax9jrcl24ymz54wx6sk0gvq95i7";
    };
 
-  propagatedBuildInputs = [ regex langcodes ftfy msgpack mecab-python3 jieba ];
+  propagatedBuildInputs = [
+    regex
+    langcodes
+    ftfy
+    msgpack
+    mecab-python3
+    jieba
+  ];
 
-  # patch to relax version requirements for regex
-  # dependency to prevent break in upgrade
   postPatch = ''
     substituteInPlace setup.py --replace "regex ==" "regex >="
   '';
 
-  checkInputs = [ pytest ];
-
-  checkPhase = ''
-    # These languages require additional dictionaries
-    pytest tests -k 'not test_japanese and not test_korean and not test_languages and not test_french_and_related'
-  '';
+  checkInputs = [ pytestCheckHook ];
+  disabledTests = [
+    # These languages require additional dictionaries that aren't packaged
+    "test_languages"
+    "test_japanese"
+    "test_korean"
+  ];
 
   meta = with lib; {
     description = "A library for looking up the frequencies of words in many languages, based on many sources of data";