2019-06-06 10:44:15 +02:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
2020-08-16 01:20:32 +02:00
|
|
|
, isPy3k
|
2019-06-06 10:44:15 +02:00
|
|
|
, requests
|
|
|
|
, flake8
|
|
|
|
, mock
|
|
|
|
, pytest
|
|
|
|
, mystem
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "pymystem3";
|
|
|
|
version = "0.2.0";
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "15gv78m17g958gfka6rr3rg230g6b5ssgk8bfpsp7k2iajhxdbhs";
|
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ requests ];
|
|
|
|
checkInputs = [ flake8 mock pytest ];
|
2020-08-16 01:20:32 +02:00
|
|
|
doCheck = isPy3k; # fails on linting
|
2019-06-06 10:44:15 +02:00
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i 's#^_mystem_info = .*#_mystem_info = ["${mystem}/bin", "${mystem}/bin/mystem"]#' pymystem3/constants.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python wrapper for the Yandex MyStem 3.1 morpholocial analyzer of the Russian language";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/nlpub/pymystem3";
|
2019-06-06 10:44:15 +02:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ abbradar ];
|
|
|
|
};
|
|
|
|
}
|