Skip to content

Commit

Permalink
building: avoid importing PySimpleGUI prior to binary dep. analysis
Browse files Browse the repository at this point in the history
Add `PySimpleGUI` to the list of packages whose import should be
explicitly suppressed when importing packages for tracking of
dynamic library search path modifications prior to binary
dependency analysis.

`PySimpleGUI` 5.x displays a "first-run" dialog when imported
for the first time, which breaks unattended PyInstaller builds
(for example, building on CI, where the dialog cannot be closed
but will be shown every time due to clean environment).
  • Loading branch information
rokm committed Apr 10, 2024
1 parent 5fe0691 commit 4f194dc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PyInstaller/building/build_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,11 @@ def process_search_paths():
# well as https://github.com/pyqtgraph/pyqtgraph/issues/2838.
suppressed_imports += ['pyqtgraph.canvas']

# PySimpleGUI 5.x displays a "first-run" dialog when imported for the first time, which blocks the loop below.
# This is a problem for building on CI, where the dialog cannot be closed, and where PySimpleGUI runs "for the
# first time" every time. See #8396.
suppressed_imports += ['PySimpleGUI']

# Processing in isolated environment.
with isolated.Python() as child:
child.call(setup, suppressed_imports)
Expand Down
6 changes: 6 additions & 0 deletions news/8396.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
(Windows) Avoid trying to import ``PySimpleGUI`` in the subprocess that
analyzes dynamic library search modifications made by packages prior to
the binary dependency analysis. When imported for the first time,
``PySimpleGUI`` 5.x displays a "first-run" dialog, which poses a problem
for unattended PyInstaller builds running in a clean environment, for
example, in a CI pipeline.

0 comments on commit 4f194dc

Please sign in to comment.