Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add hook for cmocean #769

Merged
merged 4 commits into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions _pyinstaller_hooks_contrib/stdhooks/hook-cmocean.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# ------------------------------------------------------------------
# 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
# ------------------------------------------------------------------

from PyInstaller.utils.hooks import collect_data_files

datas = collect_data_files("cmocean", subdir="rgb")
1 change: 1 addition & 0 deletions news/769.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``cmocean``, which has text data files.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ cftime==1.6.4
charset_normalizer==3.3.2
cloudpickle==3.0.0
cloudscraper==1.2.71
cmocean==4.0.3
# compliance-checker requires cf-units, so same constraints apply.
compliance-checker==5.1.1; sys_platform != 'win32'
cryptography==43.0.0
Expand Down
7 changes: 7 additions & 0 deletions tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -2114,3 +2114,10 @@ def test_patoolib(pyi_builder):
cmdlist = patoolib.get_archive_cmdlist_func(program, 'extract', archive_format)
print(f"Cmdlist: {cmdlist}")
""")


@importorskip('cmocean')
def test_cmocean(pyi_builder):
pyi_builder.test_source("""
import cmocean
""")
Loading