From 1370970ca81e72188faedd50b448379247c2efaf Mon Sep 17 00:00:00 2001 From: "Robert T. McGibbon" Date: Sat, 8 May 2021 18:13:31 -0400 Subject: [PATCH] python3Packages.wordfeq: 2.3.2 -> 2.5 --- .../python-modules/wordfreq/default.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/wordfreq/default.nix b/pkgs/development/python-modules/wordfreq/default.nix index d687ffd2d0b..6aa8599653b 100644 --- a/pkgs/development/python-modules/wordfreq/default.nix +++ b/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";