From 2b9b5d13988131d18e78293954eee828c802d1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20RAMAGE?= Date: Wed, 4 Nov 2020 12:04:07 +0100 Subject: [PATCH] hooks: Add hook for lxml (#66) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Sébastien RAMAGE --- news/66.new.rst | 1 + .../hooks/stdhooks/hook-lxml.py | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 news/66.new.rst create mode 100644 src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-lxml.py diff --git a/news/66.new.rst b/news/66.new.rst new file mode 100644 index 000000000..529f57d4e --- /dev/null +++ b/news/66.new.rst @@ -0,0 +1 @@ +Add hook for lxml which has hidden imports. \ No newline at end of file diff --git a/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-lxml.py b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-lxml.py new file mode 100644 index 000000000..8f39d7f94 --- /dev/null +++ b/src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-lxml.py @@ -0,0 +1,20 @@ +# ------------------------------------------------------------------ +# 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 +# ------------------------------------------------------------------ +# +# lxml is not fully embedded when using standard hiddenimports +# see https://github.com/pyinstaller/pyinstaller/issues/5306 +# +# Tested with lxml 4.6.1 + +from PyInstaller.utils.hooks import collect_submodules + +hiddenimports = collect_submodules('lxml')