diff options
author | Robert Schütz <rschuetz17@gmail.com> | 2018-04-05 10:38:56 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-05 10:38:56 +0200 |
commit | addb9852750551428a549e696b28ce644e1aebc2 (patch) | |
tree | 5a3b4a4949c8d260242bb6adc2f69def8e5c4611 /pkgs/development/python-modules/wordfreq/default.nix | |
parent | 554b833c01bb9247e772a8335bd5c72bacaf2ee1 (diff) | |
parent | 1f82712ee8faf8fe5ca29fb4a6b70921bd779002 (diff) | |
download | nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar.gz nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar.bz2 nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar.lz nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar.xz nixlib-addb9852750551428a549e696b28ce644e1aebc2.tar.zst nixlib-addb9852750551428a549e696b28ce644e1aebc2.zip |
Merge pull request #37784 from ixxie/wordfreq-and-deps
pythonPackages.wordfreq and dependencies
Diffstat (limited to 'pkgs/development/python-modules/wordfreq/default.nix')
-rw-r--r-- | pkgs/development/python-modules/wordfreq/default.nix | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/wordfreq/default.nix b/pkgs/development/python-modules/wordfreq/default.nix new file mode 100644 index 000000000000..9de1fd5b3922 --- /dev/null +++ b/pkgs/development/python-modules/wordfreq/default.nix @@ -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 ]; + }; +} |