pythonPackages.wordfreq: init at 2.0
This commit is contained in:
parent
ad5ff7bb9a
commit
1f82712ee8
48
pkgs/development/python-modules/wordfreq/default.nix
Normal file
48
pkgs/development/python-modules/wordfreq/default.nix
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
{ lib
|
||||||
|
, buildPythonPackage
|
||||||
|
, regex
|
||||||
|
, langcodes
|
||||||
|
, ftfy
|
||||||
|
, msgpack
|
||||||
|
, mecab-python3
|
||||||
|
, jieba
|
||||||
|
, nose
|
||||||
|
, pythonOlder
|
||||||
|
, fetchFromGitHub
|
||||||
|
}:
|
||||||
|
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "wordfreq";
|
||||||
|
version = "2.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "LuminosoInsight";
|
||||||
|
repo = "wordfreq";
|
||||||
|
rev = "e3a1b470d9f8e0d82e9f179ffc41abba434b823b";
|
||||||
|
sha256 = "1wjkhhj7nxfnrghwvmvwc672s30lp4b7yr98gxdxgqcq6wdshxwv";
|
||||||
|
};
|
||||||
|
|
||||||
|
checkInputs = [ nose ];
|
||||||
|
|
||||||
|
checkPhase = ''
|
||||||
|
# These languages require additional dictionaries
|
||||||
|
nosetests -e test_japanese -e test_korean -e test_languages
|
||||||
|
'';
|
||||||
|
|
||||||
|
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 >="
|
||||||
|
'';
|
||||||
|
|
||||||
|
disabled = pythonOlder "3";
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "A library for looking up the frequencies of words in many languages, based on many sources of data";
|
||||||
|
homepage = https://github.com/LuminosoInsight/wordfreq/;
|
||||||
|
license = licenses.mit;
|
||||||
|
maintainers = with maintainers; [ ixxie ];
|
||||||
|
};
|
||||||
|
}
|
@ -17102,6 +17102,8 @@ EOF
|
|||||||
|
|
||||||
widgetsnbextension = callPackage ../development/python-modules/widgetsnbextension { };
|
widgetsnbextension = callPackage ../development/python-modules/widgetsnbextension { };
|
||||||
|
|
||||||
|
wordfreq = callPackage ../development/python-modules/wordfreq { };
|
||||||
|
|
||||||
magic-wormhole = callPackage ../development/python-modules/magic-wormhole { };
|
magic-wormhole = callPackage ../development/python-modules/magic-wormhole { };
|
||||||
|
|
||||||
magic-wormhole-transit-relay = callPackage ../development/python-modules/magic-wormhole-transit-relay { };
|
magic-wormhole-transit-relay = callPackage ../development/python-modules/magic-wormhole-transit-relay { };
|
||||||
|
Loading…
Reference in New Issue
Block a user