Skip to content

Commit

Permalink
Remove py hidden imports for pyshark >= 0.6.
Browse files Browse the repository at this point in the history
pyshark now uses termcolor instead of py._io.terminalwriter for writing
colored text to terminals.
  • Loading branch information
bwoodsend committed Apr 26, 2023
1 parent 17afa61 commit 62ff46d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions news/575.update.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove no longer needed ``py`` hidden imports for ``pyshark >= 0.6``.
2 changes: 1 addition & 1 deletion requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ soundfile==0.12.1; sys_platform != 'linux'
limits==3.4.0
great-expectations==0.16.7
tensorflow==2.12.0; python_version >= '3.8'
pyshark==0.5.3
pyshark==0.6.0
opencv-python==4.7.0.72
hydra-core==1.3.2
spiceypy==5.1.2
Expand Down
8 changes: 5 additions & 3 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-pyshark.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,11 @@

from PyInstaller.utils.hooks import collect_data_files, is_module_satisfies

hiddenimports = ['pyshark', 'py._path.local', 'py._vendored_packages.iniconfig', 'pyshark.config']
hiddenimports = ['pyshark.config']

if is_module_satisfies("pyshark >= 0.5"):
hiddenimports += ["py._io.terminalwriter", "py._builtin"]
if is_module_satisfies("pyshark < 0.6"):
hiddenimports += ['py._path.local', 'py._vendored_packages.iniconfig']
if is_module_satisfies("pyshark >= 0.5"):
hiddenimports += ["py._io.terminalwriter", "py._builtin"]

datas = collect_data_files('pyshark')

0 comments on commit 62ff46d

Please sign in to comment.