diff --git a/news/644.new.rst b/news/644.new.rst new file mode 100644 index 00000000..935f8343 --- /dev/null +++ b/news/644.new.rst @@ -0,0 +1 @@ +Add hook for ``LaoNLP``. diff --git a/requirements-test-libraries.txt b/requirements-test-libraries.txt index 80b7e8f3..f1e1bd3e 100644 --- a/requirements-test-libraries.txt +++ b/requirements-test-libraries.txt @@ -153,6 +153,7 @@ sudachidict-core==20230711 sudachidict-small==20230711 sudachidict-full==20230711 wxPython==4.2.1; sys_platform == 'darwin' or sys_platform == 'win32' # PyPI provides binary wheels for Windows and macOS +laonlp==1.1.2 # ------------------- Platform (OS) specifics diff --git a/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-laonlp.py b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-laonlp.py new file mode 100644 index 00000000..347c63cd --- /dev/null +++ b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-laonlp.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('laonlp') diff --git a/src/_pyinstaller_hooks_contrib/tests/test_libraries.py b/src/_pyinstaller_hooks_contrib/tests/test_libraries.py index d0c16665..d0caf973 100644 --- a/src/_pyinstaller_hooks_contrib/tests/test_libraries.py +++ b/src/_pyinstaller_hooks_contrib/tests/test_libraries.py @@ -1835,3 +1835,10 @@ def test_sudachipy(pyi_builder): Dictionary(dict_type='core').create() Dictionary(dict_type='full').create() """) + + +@importorskip('laonlp') +def test_laonlp(pyi_builder): + pyi_builder.test_source(""" + import laonlp + """)