From 77353c348a46ff32f8e403ed8613bdf5eeebb4a5 Mon Sep 17 00:00:00 2001 From: BLKSerene Date: Sun, 20 Aug 2023 16:24:13 +0800 Subject: [PATCH] hooks: add hook for eng_to_ipa --- news/631.new.rst | 1 + requirements-test-libraries.txt | 1 + .../hooks/stdhooks/hook-eng_to_ipa.py | 15 +++++++++++++++ .../tests/test_libraries.py | 7 +++++++ 4 files changed, 24 insertions(+) create mode 100644 news/631.new.rst create mode 100644 src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-eng_to_ipa.py diff --git a/news/631.new.rst b/news/631.new.rst new file mode 100644 index 000000000..40b58eee3 --- /dev/null +++ b/news/631.new.rst @@ -0,0 +1 @@ +Add hook for ``eng_to_ipa``. diff --git a/requirements-test-libraries.txt b/requirements-test-libraries.txt index ca7422a9a..9ca19cbc0 100644 --- a/requirements-test-libraries.txt +++ b/requirements-test-libraries.txt @@ -142,6 +142,7 @@ opencc-python-reimplemented==0.1.7 jieba==0.42.1 simplemma==0.9.1 wordcloud==1.9.2 +eng-to-ipa==0.0.2 # ------------------- Platform (OS) specifics diff --git a/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-eng_to_ipa.py b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-eng_to_ipa.py new file mode 100644 index 000000000..d57cabdb0 --- /dev/null +++ b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-eng_to_ipa.py @@ -0,0 +1,15 @@ +# ------------------------------------------------------------------ +# Copyright (c) 2023 PyInstaller Development Team. +# +# This file is distributed under the terms of the GNU General Public +# License (version 2.0 or later). +# +# The full license is available in LICENSE.GPL.txt, distributed with +# this software. +# +# SPDX-License-Identifier: GPL-2.0-or-later +# ------------------------------------------------------------------ + +from PyInstaller.utils.hooks import collect_data_files + +datas = collect_data_files('eng_to_ipa') diff --git a/src/_pyinstaller_hooks_contrib/tests/test_libraries.py b/src/_pyinstaller_hooks_contrib/tests/test_libraries.py index e5a373cda..088f3b90f 100644 --- a/src/_pyinstaller_hooks_contrib/tests/test_libraries.py +++ b/src/_pyinstaller_hooks_contrib/tests/test_libraries.py @@ -1773,3 +1773,10 @@ def test_wordcloud(pyi_builder): wordcloud.WordCloud().generate('test') """) + + +@importorskip('eng_to_ipa') +def test_eng_to_ipa(pyi_builder): + pyi_builder.test_source(""" + import eng_to_ipa + """)