Skip to content

Commit

Permalink
Add a hook for ffpyplayer
Browse files Browse the repository at this point in the history
ffpyplayer doesn't have 3.10 wheels yet

abcabc

bcabca

asdads
  • Loading branch information
eric15342335 committed Nov 10, 2021
1 parent c549912 commit 770fea9
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/348.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``ffpyplayer``.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ dash==2.0.0
dash-bootstrap-components==1.0.0
dash-uploader==0.6.0
folium==0.12.1
ffpyplayer==4.3.2; python_version < '3.10' # doesn't have py310 wheels
h5py==3.5.0; python_version >= '3.7'
humanize==3.12.0
iminuit==2.8.4
Expand Down
19 changes: 19 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-ffpyplayer.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# ------------------------------------------------------------------
# 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 eval_statement, collect_submodules

hiddenimports = collect_submodules("ffpyplayer")
binaries = []
# ffpyplayer has an internal variable tells us where the libraries it was using
for bin in eval_statement("import ffpyplayer; print(ffpyplayer.dep_bins)"):
binaries += [(bin, '.')]
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 @@ -970,3 +970,10 @@ def test_kaleido(pyi_builder):
fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image("figure.png", engine="kaleido")
""")


@importorskip("ffpyplayer")
def test_ffpyplayer(pyi_builder):
pyi_builder.test_source("""
import ffpyplayer.player
""")

0 comments on commit 770fea9

Please sign in to comment.