Skip to content

Commit

Permalink
Add hook for spiceypy (#482)
Browse files Browse the repository at this point in the history
  • Loading branch information
ascended121 authored Sep 13, 2022
1 parent fa84d78 commit 030bb4c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
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.10.0
pyshark==0.5.3
opencv-python==4.6.0.66
hydra-core==1.2.0
spiceypy==5.1.1

# ------------------- 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
""")

0 comments on commit 030bb4c

Please sign in to comment.