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

hooks: add hook for falcon #703

Merged
merged 1 commit into from
Feb 16, 2024
Merged
Show file tree
Hide file tree
Changes from all 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/703.new.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add hook for ``falcon``, which has hidden imports.
1 change: 1 addition & 0 deletions requirements-test-libraries.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ discid==1.2.0; sys_platform != 'win32'
eth_typing==4.0.0
eth_utils==3.0.0
fabric==3.2.2
falcon==3.1.3
fiona==1.9.5; sys_platform != 'win32'
folium==0.15.1
ffpyplayer==4.5.1
Expand Down
27 changes: 27 additions & 0 deletions src/_pyinstaller_hooks_contrib/hooks/stdhooks/hook-falcon.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# ------------------------------------------------------------------
# Copyright (c) 2024 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
# ------------------------------------------------------------------

hiddenimports = [
'cgi',
'falcon.app_helpers',
'falcon.forwarded',
'falcon.media',
'falcon.request_helpers',
'falcon.responders',
'falcon.response_helpers',
'falcon.routing',
'falcon.vendor.mimeparse',
'falcon.vendor',
'uuid',
'xml.etree.ElementTree',
'xml.etree'
]
8 changes: 8 additions & 0 deletions src/_pyinstaller_hooks_contrib/tests/test_libraries.py
Original file line number Diff line number Diff line change
Expand Up @@ -1905,3 +1905,11 @@ def test_osgeo(pyi_builder):
sr.ImportFromEPSG(4326)
assert(sr.EPSGTreatsAsLatLong())
""")


@importorskip('falcon')
def test_falcon(pyi_builder):
# https://github.com/falconry/falcon/blob/v3.1.3/examples/things.py
pyi_builder.test_source("""
import falcon
""")
Loading