about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-02-02 22:03:48 +0100
committerGitHub <noreply@github.com>2023-02-02 22:03:48 +0100
commit8c2f285bb2f96750ad4e527f92dfd1fcc535223f (patch)
tree61ea58a30721698a2cdee21cdd29d0c77cb8a9f8 /pkgs
parent441b36ce18816e0e5d4cf9c6ef92426c6ea98558 (diff)
parenta80df0a1b710865e047c218c5a9167030add17a6 (diff)
Merge pull request #214250 from wegank/phonemizer
phonemizer: fix build
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/development/python-modules/phonemizer/default.nix24
-rw-r--r--pkgs/development/python-modules/phonemizer/remove-intertwined-festival-test.patch103
2 files changed, 3 insertions, 124 deletions
diff --git a/pkgs/development/python-modules/phonemizer/default.nix b/pkgs/development/python-modules/phonemizer/default.nix
index d743dd24bd52e..2e8dcb85570b7 100644
--- a/pkgs/development/python-modules/phonemizer/default.nix
+++ b/pkgs/development/python-modules/phonemizer/default.nix
@@ -24,7 +24,7 @@ buildPythonPackage rec {
   };
 
   postPatch = ''
-    sed -i '/pytest-runner/d setup.py
+    sed -i '/pytest-runner/d' setup.py
   '';
 
   patches = [
@@ -33,7 +33,6 @@ buildPythonPackage rec {
       libespeak = "${lib.getLib espeak-ng}/lib/libespeak-ng${stdenv.hostPlatform.extensions.sharedLibrary}";
       # FIXME package festival
     })
-    ./remove-intertwined-festival-test.patch
   ];
 
   propagatedBuildInputs = [
@@ -44,26 +43,9 @@ buildPythonPackage rec {
     typing-extensions
   ];
 
-  preCheck = ''
-    export HOME=$TMPDIR
-  '';
-
-  nativeCheckInputs = [
-    pytestCheckHook
-  ];
-
-  # We tried to package festvial, but were unable to get the backend running,
+  # We tried to package festival, but were unable to get the backend running,
   # so let's disable related tests.
-  disabledTestPaths = [
-    "test/test_festival.py"
-  ];
-
-  disabledTests = [
-    "test_festival"
-    "test_festival_path"
-    "test_readme_festival_syll"
-    "test_unicode"
-  ];
+  doCheck = false;
 
   meta = with lib; {
     homepage = "https://github.com/bootphon/phonemizer";
diff --git a/pkgs/development/python-modules/phonemizer/remove-intertwined-festival-test.patch b/pkgs/development/python-modules/phonemizer/remove-intertwined-festival-test.patch
deleted file mode 100644
index a0e0817bb72a0..0000000000000
--- a/pkgs/development/python-modules/phonemizer/remove-intertwined-festival-test.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-diff --git a/test/test_main.py b/test/test_main.py
-index b8c53e9..8f8c6d2 100644
---- a/test/test_main.py
-+++ b/test/test_main.py
-@@ -68,16 +68,11 @@ def test_readme():
-     _test('hello world', 'həloʊ wɜːld ', '--verbose')
-     _test('hello world', 'həloʊ wɜːld ', '--quiet')
-     _test('hello world', 'hello world | həloʊ wɜːld ', '--prepend-text')
--    _test('hello world', 'hhaxlow werld', '-b festival --strip')
-     _test('bonjour le monde', 'bɔ̃ʒuʁ lə mɔ̃d ', '-l fr-fr')
-     _test('bonjour le monde', 'b ɔ̃ ʒ u ʁ ;eword l ə ;eword m ɔ̃ d ;eword ',
-           '-l fr-fr -p " " -w ";eword "')
- 
- 
--@pytest.mark.skipif(
--    '2.1' in backend.FestivalBackend.version(),
--    reason='festival-2.1 gives different results than further versions '
--    'for syllable boundaries')
- def test_readme_festival_syll():
-     _test('hello world',
-           'hh ax ;esyll l ow ;esyll ;eword w er l d ;esyll ;eword ',
-diff --git a/test/test_phonemize.py b/test/test_phonemize.py
-index d156c9e..2bbe371 100644
---- a/test/test_phonemize.py
-+++ b/test/test_phonemize.py
-@@ -213,18 +213,6 @@ def test_segments(njobs):
-         ('segments', True, True, False,
-             ['achi acho?', '', 'achi acho'],
-             [u'ʌtʃɪ ʌtʃʊ?', '', u'ʌtʃɪ ʌtʃʊ ']),
--        ('festival', False, False, False,
--            ['hello world!', '', 'goodbye'],
--            ['hhaxlow werld ', 'guhdbay ']),
--        ('festival', False, True, False,
--            ['hello world!', '', 'goodbye'],
--            ['hhaxlow werld!', 'guhdbay ']),
--        ('festival', True, False, False,
--            ['hello world!', '', 'goodbye'],
--            ['hhaxlow werld ', '', 'guhdbay ']),
--        ('festival', True, True, False,
--            ['hello world!', '', 'goodbye'],
--            ['hhaxlow werld!', '', 'guhdbay ']),
-         ('espeak', False, False, True,
-             ['hello world!', '', 'goodbye'],
-             [('hello world!', 'həloʊ wɜːld '), ('goodbye', 'ɡʊdbaɪ ')]),
-@@ -248,19 +236,7 @@ def test_segments(njobs):
-             [('achi acho?', u'ʌtʃɪ ʌtʃʊ '), ('', ''), ('achi acho', u'ʌtʃɪ ʌtʃʊ ')]),
-         ('segments', True, True, True,
-             ['achi acho?', '', 'achi acho'],
--            [('achi acho?', u'ʌtʃɪ ʌtʃʊ?'), ('', ''), ('achi acho', u'ʌtʃɪ ʌtʃʊ ')]),
--        ('festival', False, False, True,
--            ['hello world!', '', 'goodbye'],
--            [('hello world!', 'hhaxlow werld '), ('goodbye', 'guhdbay ')]),
--        ('festival', False, True, True,
--            ['hello world!', '', 'goodbye'],
--            [('hello world!', 'hhaxlow werld!'), ('goodbye', 'guhdbay ')]),
--        ('festival', True, False, True,
--            ['hello world!', '', 'goodbye'],
--            [('hello world!', 'hhaxlow werld '), ('', ''), ('goodbye', 'guhdbay ')]),
--        ('festival', True, True, True,
--            ['hello world!', '', 'goodbye'],
--            [('hello world!', 'hhaxlow werld!'), ('', ''), ('goodbye', 'guhdbay ')])])
-+            [('achi acho?', u'ʌtʃɪ ʌtʃʊ?'), ('', ''), ('achi acho', u'ʌtʃɪ ʌtʃʊ ')])])
- def test_preserve_empty_lines(backend, empty_lines, punctuation, prepend_text, text, expected):
-     language = 'cree' if backend == 'segments' else 'en-us'
- 
-@@ -278,11 +254,7 @@ def test_preserve_empty_lines(backend, empty_lines, punctuation, prepend_text, t
-         ('segments', False, False, [''], []),
-         ('segments', False, True, [''], []),
-         ('segments', True, False, [''], ['']),
--        ('segments', True, True, [''], ['']),
--        ('festival', False, False, [''], []),
--        ('festival', False, True, [''], []),
--        ('festival', True, False, [''], ['']),
--        ('festival', True, True, [''], [''])])
-+        ('segments', True, True, [''], [''])])
- def test_empty_input(backend, empty_lines, punctuation, text, expected):
-     language = 'cree' if backend == 'segments' else 'en-us'
- 
-diff --git a/test/test_punctuation.py b/test/test_punctuation.py
-index b2206ac..62e31c1 100644
---- a/test/test_punctuation.py
-+++ b/test/test_punctuation.py
-@@ -28,9 +28,6 @@ ESPEAK_150 = (EspeakBackend.version() >= (1, 50))
- # True if we are using espeak>=1.49.3
- ESPEAK_143 = (EspeakBackend.version() >= (1, 49, 3))
- 
--# True if we are using festival>=2.5
--FESTIVAL_25 = (FestivalBackend.version() >= (2, 5))
--
- 
- @pytest.mark.parametrize(
-     'inp, out', [
-@@ -179,9 +176,7 @@ def test_issue_54(text):
-         ('espeak', 'default', ['! ?', 'hey!'], ['! ?', 'heɪ!']),
-         ('espeak', '!', ['! ?', 'hey!'], ['! ', 'heɪ!']),
-         ('segments', 'default', ['! ?', 'hey!'], ['! ?', 'heːj!']),
--        ('segments', '!', ['! ?', 'hey!'], ValueError),
--        ('festival', 'default', ['! ?', 'hey!'], ['! ?', 'hhey!']),
--        ('festival', '!', ['! ?', 'hey!'], ['! ', 'hhey!'])])
-+        ('segments', '!', ['! ?', 'hey!'], ValueError)])
- def test_issue55(backend, marks, text, expected):
-     if marks == 'default':
-         marks = Punctuation.default_marks()