Skip to content

Commit

Permalink
Add hooks for pyphen and kaleido (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
wf-r committed Nov 8, 2021
1 parent 44c0dc7 commit c549912
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 0 deletions.
1 change: 1 addition & 0 deletions news/345.new.1.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hooks for ``pyphen`` and ``kaleido``.
2 changes: 2 additions & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ folium==0.12.1
h5py==3.5.0; python_version >= '3.7'
humanize==3.12.0
iminuit==2.8.4
kaleido==0.2.1
langdetect==1.0.9
mariadb==1.0.8; sys_platform != "darwin"
markdown==3.3.4
Expand All @@ -42,6 +43,7 @@ pycryptodome==3.11.0
pycryptodomex==3.11.0
pyexcelerate==0.10.0
pylint==2.11.1
pyphen==0.11.0
pyppeteer==0.2.6
pyusb==1.2.1
pyviz-comms==2.1.0
Expand Down
15 changes: 15 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-kaleido.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('kaleido')
15 changes: 15 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-pyphen.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('pyphen')
18 changes: 18 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -952,3 +952,21 @@ def test_pyviz_comms(pyi_builder):
pyi_builder.test_source("""
import pyviz_comms
""")


@importorskip("pyphen")
def test_pyphen(pyi_builder):
pyi_builder.test_source("""
import pyphen
""")


@importorskip("pandas")
@importorskip("plotly")
@importorskip("kaleido")
def test_kaleido(pyi_builder):
pyi_builder.test_source("""
import plotly.express as px
fig = px.scatter(px.data.iris(), x="sepal_length", y="sepal_width", color="species")
fig.write_image("figure.png", engine="kaleido")
""")

0 comments on commit c549912

Please sign in to comment.