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
, 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";