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

fix: include python3.dll in windows pyinstaller builds #255

Merged
merged 1 commit into from
Mar 28, 2024
Merged
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
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