Skip to content

Commit

Permalink
hooks: add hook for falcon
Browse files Browse the repository at this point in the history
  • Loading branch information
davetapley committed Feb 16, 2024
1 parent 6e471c8 commit b2855e7
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 0 deletions.
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
""")

0 comments on commit b2855e7

Please sign in to comment.