diff --git a/news/108.update.rst b/news/108.update.rst new file mode 100644 index 00000000..ea308a3a --- /dev/null +++ b/news/108.update.rst @@ -0,0 +1 @@ +Update ``scikit-learn`` hooks for compatibility with 0.24.x series. diff --git a/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-sklearn.linear_model.py b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-sklearn.linear_model.py new file mode 100644 index 00000000..b3abf1a7 --- /dev/null +++ b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-sklearn.linear_model.py @@ -0,0 +1,18 @@ +# ------------------------------------------------------------------ +# 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 is_module_satisfies + +# sklearn.linear_model in scikit-learn 0.24.x has a hidden import of +# sklearn.utils._weight_vector +if is_module_satisfies("sklearn >= 0.24"): + hiddenimports = ['sklearn.utils._weight_vector', ]