-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Add hook for ``fastparquet``. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-fastparquet.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# ------------------------------------------------------------------ | ||
# Copyright (c) 2023 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 | ||
# ------------------------------------------------------------------ | ||
import os | ||
|
||
from PyInstaller.compat import is_win | ||
from PyInstaller.utils.hooks import get_package_paths | ||
|
||
# In all versions for which fastparquet provides Windows wheels (>= 0.7.0), delvewheel is used, | ||
# so we need to collect the external site-packages/fastparquet.libs directory. | ||
if is_win: | ||
pkg_base, pkg_dir = get_package_paths("fastparquet") | ||
lib_dir = os.path.join(pkg_base, "fastparquet.libs") | ||
if os.path.isdir(lib_dir): | ||
# We collect DLLs as data files instead of binaries to suppress binary | ||
# analysis, which would result in duplicates (because it collects a copy | ||
# into the top-level directory instead of preserving the original layout). | ||
# In addition to DLls, this also collects .load-order* file (required on | ||
# python < 3.8), and ensures that fastparquet.libs directory exists (required | ||
# on python >= 3.8 due to os.add_dll_directory call). | ||
datas = [ | ||
(os.path.join(lib_dir, lib_file), 'fastparquet.libs') | ||
for lib_file in os.listdir(lib_dir) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters