python3.pkgs.gruut: 1.2.3 -> 2.2.0
This commit is contained in:
parent
4fdf2679f7
commit
c853e47154
1 changed files with 26 additions and 7 deletions
|
@ -5,11 +5,15 @@
|
|||
, fetchFromGitHub
|
||||
, Babel
|
||||
, gruut-ipa
|
||||
, dateparser
|
||||
, jsonlines
|
||||
, num2words
|
||||
, python-crfsuite
|
||||
, dataclasses
|
||||
, python
|
||||
, networkx
|
||||
, glibcLocales
|
||||
, pytestCheckHook
|
||||
}:
|
||||
|
||||
let
|
||||
|
@ -17,6 +21,7 @@ let
|
|||
"cs"
|
||||
"de"
|
||||
"es"
|
||||
"en"
|
||||
"fr"
|
||||
"it"
|
||||
"nl"
|
||||
|
@ -28,19 +33,21 @@ let
|
|||
in
|
||||
buildPythonPackage rec {
|
||||
pname = "gruut";
|
||||
version = "1.2.3";
|
||||
version = "2.2.0";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rhasspy";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-qY4xsoVk1hyY9dYmVXaqDRjcShUQmp8VZOzAQNiC6EM=";
|
||||
sha256 = "sha256-9vj3x2IjTso8ksN1cqe5frwg0Y3GhOB6bPWvaBSBOf8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace requirements.txt \
|
||||
--replace "Babel~=2.8.0" "Babel"
|
||||
--replace "Babel~=2.8.0" "Babel" \
|
||||
--replace "dateparser~=1.0.0" "dateparser" \
|
||||
--replace "gruut_lang_en~=2.0.0" "gruut_lang_en"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
@ -49,16 +56,28 @@ buildPythonPackage rec {
|
|||
jsonlines
|
||||
num2words
|
||||
python-crfsuite
|
||||
dateparser
|
||||
networkx
|
||||
] ++ lib.optionals (pythonOlder "3.7") [
|
||||
dataclasses
|
||||
] ++ (map (lang: callPackage ./language-pack.nix {
|
||||
inherit lang version format src;
|
||||
}) langPkgs);
|
||||
|
||||
checkPhase = ''
|
||||
runHook preCheck
|
||||
${python.interpreter} -m unittest discover
|
||||
runHook postCheck
|
||||
checkInputs = [ glibcLocales pytestCheckHook ];
|
||||
|
||||
disabledTests = [
|
||||
# https://github.com/rhasspy/gruut/issues/25
|
||||
"test_lexicon_external"
|
||||
|
||||
# requires mishkal library
|
||||
"test_fa"
|
||||
"test_ar"
|
||||
"test_lb"
|
||||
];
|
||||
|
||||
preCheck = ''
|
||||
export LC_ALL=en_US.utf-8
|
||||
'';
|
||||
|
||||
pythonImportsCheck = [
|
||||
|
|
Loading…
Reference in a new issue