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

Add window hiddenimport #2287

Merged
merged 1 commit into from
Jul 7, 2023

Conversation

Starbuck5
Copy link
Member

In #2114, the Window class was moved to a hidden C module.

When distributing with PyInstaller, this C module is not picked up, so any program that uses Window fails at runtime only after building.

The solution to this is to add it as a hiddenimport to our pyinstaller hook.

@Starbuck5 Starbuck5 requested a review from a team as a code owner July 5, 2023 00:23
@Starbuck5 Starbuck5 added video pygame.video bugfix PR that fixes bug labels Jul 5, 2023
@Starbuck5 Starbuck5 added this to the 2.3.1 milestone Jul 5, 2023
@yolowex
Copy link
Contributor

yolowex commented Jul 5, 2023

This is great, but I can't test this on the os that encountered this issue, since it's not my pc and I can't have them build pygame from source. (unless it's included in a dev release?)

@Starbuck5
Copy link
Member Author

Why can't you test this?

This is not OS specific. This is pygame-ce version specific. Make a pyinstaller build of a program that uses Window. With this patch it works, without it it fails at runtime.

Copy link
Member

@ankith26 ankith26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, LGTM 🎉

@Starbuck5 Starbuck5 requested a review from yunline July 7, 2023 06:29
Copy link
Contributor

@yunline yunline left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉

@ankith26 ankith26 merged commit 169e617 into pygame-community:main Jul 7, 2023
28 checks passed
@Starbuck5 Starbuck5 deleted the add-window-hiddenimport branch August 5, 2023 05:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix PR that fixes bug PyInstaller video pygame.video
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants