Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add hook for spiceypy #482

Merged
merged 4 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from 2 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
1 change: 1 addition & 0 deletions news/482.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add a hook for ``spiceypy``, which has binary files.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ tensorflow==2.9.2
pyshark==0.5.3
opencv-python==4.6.0.66
hydra-core==1.2.0
spinceypy==5.1.1
ascended121 marked this conversation as resolved.
Show resolved Hide resolved

# ------------------- Platform (OS) specifics

Expand Down
18 changes: 18 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-spiceypy.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# ------------------------------------------------------------------
# Copyright (c) 2020 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
# ------------------------------------------------------------------

# Hook for spiceypy: https://pypi.org/project/spiceypy/
# Tested on Ubuntu 20.04 with spiceypy 5.1.1

from PyInstaller.utils.hooks import collect_dynamic_libs

binaries = collect_dynamic_libs("spiceypy")
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 @@ -1328,3 +1328,10 @@ def test_pythoncom(pyi_builder):
pyi_builder.test_source("""
import pythoncom
""")


@importorskip('spiceypy')
def test_spiceypy(pyi_builder):
pyi_builder.test_source("""
import spiceypy
""")
ascended121 marked this conversation as resolved.
Show resolved Hide resolved