python3Packages.wordfeq: 2.3.2 -> 2.5

This commit is contained in:
Robert T. McGibbon 2021-05-08 18:13:31 -04:00 committed by Jonathan Ringer
parent b88ed9cbe7
commit 1370970ca8

View file

@ -6,38 +6,43 @@
, msgpack , msgpack
, mecab-python3 , mecab-python3
, jieba , jieba
, pytest , pytestCheckHook
, pythonOlder , isPy27
, fetchFromGitHub , fetchFromGitHub
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "wordfreq"; pname = "wordfreq";
version = "2.3.2"; version = "2.5";
disabled = pythonOlder "3"; disabled = isPy27;
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "LuminosoInsight"; owner = "LuminosoInsight";
repo = "wordfreq"; repo = "wordfreq";
# upstream don't tag by version
rev = "v${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 = '' postPatch = ''
substituteInPlace setup.py --replace "regex ==" "regex >=" substituteInPlace setup.py --replace "regex ==" "regex >="
''; '';
checkInputs = [ pytest ]; checkInputs = [ pytestCheckHook ];
disabledTests = [
checkPhase = '' # These languages require additional dictionaries that aren't packaged
# These languages require additional dictionaries "test_languages"
pytest tests -k 'not test_japanese and not test_korean and not test_languages and not test_french_and_related' "test_japanese"
''; "test_korean"
];
meta = with lib; { meta = with lib; {
description = "A library for looking up the frequencies of words in many languages, based on many sources of data"; description = "A library for looking up the frequencies of words in many languages, based on many sources of data";