Skip to content

Commit

Permalink
hooks: add hook for seedir
Browse files Browse the repository at this point in the history
Add hook for `seedir` that collects the `words.txt` data file from
the package.
  • Loading branch information
rokm committed Jan 3, 2024
1 parent adb0eeb commit 7d0c295
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions news/681.new.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add hook for ``seedir`` that collects the ``words.txt`` data file from
the package.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ z3c.rml==4.4.0
freetype-py==2.4.0
vaderSentiment==3.3.2
langchain==0.0.353
seedir==0.4.2

# ------------------- Platform (OS) specifics

Expand Down
15 changes: 15 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-seedir.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# 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

datas = collect_data_files('seedir')
7 changes: 7 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1859,3 +1859,10 @@ def test_langchain_llm_summarization_checker(pyi_builder):
pyi_builder.test_source("""
import langchain.chains.llm_summarization_checker.base
""")


@importorskip('seedir')
def test_seedir(pyi_builder):
pyi_builder.test_source("""
import seedir
""")

0 comments on commit 7d0c295

Please sign in to comment.