Skip to content

Commit

Permalink
Add hook for pydicom (#776)
Browse files Browse the repository at this point in the history
  • Loading branch information
MattTheCuber authored Aug 6, 2024
1 parent 3bec161 commit 28151ea
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
17 changes: 17 additions & 0 deletions _pyinstaller_hooks_contrib/stdhooks/hook-pydicom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# ------------------------------------------------------------------
# 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, distributed with
# this software.
#
# SPDX-License-Identifier: GPL-2.0-or-later
# ------------------------------------------------------------------

hiddenimports = [
"pydicom.encoders.gdcm",
"pydicom.encoders.pylibjpeg",
"pydicom.encoders.native",
]
1 change: 1 addition & 0 deletions news/776.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``pydicom``, which has hidden imports.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ publicsuffix2==2.20191221
pycparser==2.22
pycryptodome==3.20.0
pycryptodomex==3.20.0
pydicom==2.4.4
pyexcelerate==0.12.0
pylibmagic==0.5.0; sys_platform != 'win32'
pylint==3.2.6
Expand Down
7 changes: 7 additions & 0 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2129,3 +2129,10 @@ def test_tzwhere(pyi_builder):
from tzwhere import tzwhere
tzwhere.tzwhere()
""")


@importorskip('pydicom')
def test_pydicom(pyi_builder):
pyi_builder.test_source("""
import pydicom
""")

0 comments on commit 28151ea

Please sign in to comment.