Skip to content

Commit

Permalink
fix: include python3.dll in windows pyinstaller builds (#255)
Browse files Browse the repository at this point in the history
Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com>
  • Loading branch information
epmog committed Mar 28, 2024
1 parent 98b14c7 commit a63f3ae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions scripts/pyinstaller/deadline_cli.spec
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,22 @@ cli_a = Analysis(
cipher=BLOCK_CIPHER,
)

# Need to ensure we bundle python3.dll to ensure Shiboken works on windows
if sys.platform == "win32":
python3_dll = None
for name, path, _ in cli_a.binaries:
if name == "python3.dll":
break
if not (name.startswith("python") and name.endswith(".dll")):
continue
python3_dll = str(Path(path).parent / "python3.dll")
break

if not python3_dll:
raise RuntimeError("python3.dll was not added to binaries, but is required for windows to download pyside. Failing build")

cli_a.binaries += [('python3.dll', python3_dll, 'BINARY')]

# Filter out the UI submodule for now
deadline_ui = os.path.join('deadline', 'ui')
cli_a.datas = [item for item in cli_a.datas if not item[0].startswith(deadline_ui)]
Expand Down

0 comments on commit a63f3ae

Please sign in to comment.