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

Fixing pyinstaller with "native=True" #582

Merged
merged 1 commit into from
Mar 21, 2023
Merged

Conversation

rodja
Copy link
Member

@rodja rodja commented Mar 21, 2023

In #579 we fixed the broken feature of using PyInstaller to create frozen packages. But that fix still fails if we actually want to use the native mode with PyInstaller.

This PR fixes it by moving the instantiation of the multiprocessing.Event() into the native_mode.activate function. This has two benefits:

  1. if native mode is not active, we do not need to enable freeze_support at all
  2. we can enable freeze_support at the correct moment for allowing it to work with native mode

This simplifies the freeze_support call
@rodja rodja added this to the v1.2.1 milestone Mar 21, 2023
@rodja rodja self-assigned this Mar 21, 2023
@rodja rodja added the bug Something isn't working label Mar 21, 2023
Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

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

Looks reasonable to move all multiprocessing-related code into activate. 👍🏻

@falkoschindler falkoschindler merged commit eeb19b3 into main Mar 21, 2023
@falkoschindler falkoschindler deleted the pyinstaller_fix branch March 21, 2023 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants