Skip to content

Commit

Permalink
Fix PyInstaller hooks to work with pyinstaller>=6.x.x #8653 (#8654)
Browse files Browse the repository at this point in the history
  • Loading branch information
ikus060 committed Apr 2, 2024
1 parent 3846952 commit 5d17b27
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions kivy/tools/packaging/pyinstaller_hooks/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@
except ImportError:
kivy_deps = None
from kivy.factory import Factory
from PyInstaller.depend import bindepend
try:
# Pyinstaller >= 6
from PyInstaller.depend.bindepend import get_imports
except ImportError:
# Pyinstaller < 6
from PyInstaller.depend.bindepend import selectImports as get_imports

from os import environ
if 'KIVY_DOC' not in environ:
Expand Down Expand Up @@ -367,7 +372,7 @@ def _find_gst_binaries():

lib_filepaths = set()
for plugin_filepath in plugin_filepaths:
plugin_deps = bindepend.selectImports(plugin_filepath)
plugin_deps = get_imports(plugin_filepath)
lib_filepaths.update([path for _, path in plugin_deps])

plugin_binaries = [(f, 'gst-plugins') for f in plugin_filepaths]
Expand Down

0 comments on commit 5d17b27

Please sign in to comment.