Digital-Sapphire/PyUpdater

PyInstaller hook conflict

colin-fsa opened this issue · 5 comments

I believe that there is a conflict between PyUpdater v4 and PyInstaller v3. Starting with PyInstaller v3.1 there is an nacl hook included which wasn't removed until PyInstaller v4. This causes a conflict with PyUpdater v4 which also has an nacl hook.

The duplicate hook causes an assertion error when attempting to build the exe. The solution is to upgrade PyInstaller to v4, so I believe the systematic fix is to updates requirements.txt to require pyinstaller>=4.0.

If updating the requirements file is truly all that's needed I'd be happy to submit a PR with the change.

A minimal example is below, trying to build any python script with this environment will result in:
File "c:...\env\lib\site-packages\PyInstaller\depend\imphook.py", line 289, in init
assert self.hook_module_name not in HOOKS_MODULE_NAMES
AssertionError

requirements.txt
main.zip

Hi @cscheriff, thanks for the report. I think we could also remove the ncal hook from PyUpdater. I don't want to force PyInstaller v4 on anyone. A PR is welcomed ;)

Just curious for your decision here @JMSwag
Why wouldn't you have PyUpdater Rely on PyInstaller >= 4.0
I mean, new is better right? And besides, wouldn't there be some speed / security improvements gained?

@NicklasTegner Essentially, I want to give end users the ability to decide. If this repo housed an application and not a library, I'd want to be using the latest and greatest.

@JMSwag Sorry, I meant to write back to clarify but dropped the ball. Are you saying the nacl hook that's in PyUpdater isn't actually needed? Since it was a change in the latest version I assumed there was a still-relevant reason it was added.

@cscheriff I'm pretty sure it's not necessary. I can confirm later tonight.