File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -496,6 +496,14 @@ def release_pyinstaller(context):
496
496
# """
497
497
# Solution found here:
498
498
# https://stackoverflow.com/a/64473931/598057
499
+ #
500
+ # The --hidden-import strictdoc.server.app flag is needed because without
501
+ # it, the following is produced:
502
+ # ERROR: Error loading ASGI app. Could not import
503
+ # module "strictdoc.server.app".
504
+ # Solution found here: https://stackoverflow.com/a/71340437/598057
505
+ # This behavior is not surprising because that's how the uvicorn loads the
506
+ # application separately from the parent process.
499
507
command = f"""
500
508
pip install pyinstaller &&
501
509
pyinstaller
@@ -504,6 +512,7 @@ def release_pyinstaller(context):
504
512
--noconfirm
505
513
--additional-hooks-dir developer/pyinstaller_hooks
506
514
--distpath { path_to_pyi_dist }
515
+ --hidden-import strictdoc.server.app
507
516
--add-data strictdoc/export/html/templates:templates/html
508
517
--add-data strictdoc/export/rst/templates:templates/rst
509
518
--add-data strictdoc/export/html/_static:_static
You can’t perform that action at this time.
0 commit comments