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

Conversation

epmog
Copy link
Contributor

@epmog epmog commented Mar 28, 2024

What was the problem/requirement? (What/Why)

Windows pyinstaller builds were not able to pip install pyside6 after the fact. This was due to Shiboken failing to load it's dependent modules:

DLL load failed while importing Shiboken: The specified module could not be found.
PySide6/__init__.py: Unable to import Shiboken from C:\Users\epmog\DeadlineCloudSubmitter\DeadlineClient\cli\base_library.zip, C:\Users\epmog\DeadlineCloudSubmitter\DeadlineClient\cli\lib-dynload, C:\Users\epmog\DeadlineCloudSubmitter\DeadlineClient\cli, C:\Users\epmog\DeadlineCloudSubmitter\DeadlineClient\cli\win32, C:\Users\epmog\DeadlineCloudSubmitter\DeadlineClient\cli\pywin32_system32
Failed to import qtpy/PySide/Qt, which is required to show the GUI:
No Qt bindings could be found

Unfortunately it doesn't tell us the missing DLL!

What was the solution? (How)

Long story short, found out that python3.dll was the missing link! So we force that include for Windows pyinstaller builds by checking the binaries and adding it if it isn't there.

What is the impact of this change?

Windows users of pyinstaller can now download pyside/qt!

How was this change tested?

On a windows instance:

$ export OUT_FILE=./pyinstall_fix.zip
$ hatch run codebuild-installer:make_exe
$ unzip ./pyinstall_fix.zip
$ cd pyinstall_fix
$ deadline.exe config gui
Optional GUI components for deadline are unavailable. Would you like to install PySide? [y/N]: y
...
# GUI pops up!

Was this change documented?

n/a

Is this a breaking change?

n/a

@epmog epmog requested a review from a team as a code owner March 28, 2024 02:50
@epmog epmog force-pushed the fix_windows_dynamic_gui branch from 6000a96 to 49007af Compare March 28, 2024 02:51
@ddneilson ddneilson merged commit a63f3ae into mainline Mar 28, 2024
18 checks passed
@ddneilson ddneilson deleted the fix_windows_dynamic_gui branch March 28, 2024 03:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants