Skip to content

Commit

Permalink
hooks: add hook for mnemonic (#284)
Browse files Browse the repository at this point in the history
  • Loading branch information
eric15342335 committed Aug 3, 2021
1 parent ecbd0cf commit 50c34f5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/284.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``mnemonic`` 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 @@ -12,6 +12,7 @@ humanize==3.5.0
iminuit==2.4.0
mariadb==1.0.7; sys_platform != "darwin"
markdown==3.2.1
mnemonic==0.20
msoffcrypto-tool==4.12.0
Office365-REST-Python-Client==2.3.4
openpyxl==3.0.3
Expand Down
15 changes: 15 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-mnemonic.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# Copyright (c) 2021 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('mnemonic')
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 @@ -649,3 +649,11 @@ def test_cloudscraper(pyi_builder):
import cloudscraper
scraper = cloudscraper.create_scraper()
""")


@importorskip('mnemonic')
def test_mnemonic(pyi_builder):
pyi_builder.test_source("""
import mnemonic
mnemonic.Mnemonic("english")
""")

0 comments on commit 50c34f5

Please sign in to comment.