Skip to content

Commit

Permalink
Add hook for iso639-lang (#707)
Browse files Browse the repository at this point in the history
Add a hook for `iso639-lang` to collect its data files.
  • Loading branch information
jessielw authored Feb 22, 2024
1 parent 6bc3a33 commit 47c1e42
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/707.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``iso639-lang``, to collect data files
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ python-gitlab==4.4.0
h5py==3.10.0
humanize==4.9.0
iminuit==2.25.2
iso639-lang==2.2.3
kaleido==0.2.1 # pyup: != 0.2.1.post1 # Contains only an invalid armv7l wheel.
langdetect==1.0.9
mariadb==1.1.10; sys_platform != "darwin"
Expand Down
16 changes: 16 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-iso639.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# ------------------------------------------------------------------
# Copyright (c) 2024 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

# Collect data files for iso639
datas = collect_data_files("iso639")
8 changes: 8 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1913,3 +1913,11 @@ def test_falcon(pyi_builder):
pyi_builder.test_source("""
import falcon
""")


@importorskip('iso639')
def test_iso639(pyi_builder):
pyi_builder.test_source("""
from iso639 import Lang
test = Lang("en")
""")

0 comments on commit 47c1e42

Please sign in to comment.