Skip to content

users can pass additional_hooks_dir to pyinstaller#157

Closed
NileGraddis wants to merge 1 commit intomherrmann:masterfrom
NileGraddis:additional_hooks_dir
Closed

users can pass additional_hooks_dir to pyinstaller#157
NileGraddis wants to merge 1 commit intomherrmann:masterfrom
NileGraddis:additional_hooks_dir

Conversation

@NileGraddis
Copy link
Copy Markdown

For many popular packages the hooks included with pyinstaller are sufficient, but for less prominent (or non-public) packages, custom hooks are required.

This PR allows users to specify additional directories for pyinstaller hooks in their settings files. This looks like:

{
...
    "additional_hooks_dir": ["some_hooks", "some_more_hooks"]
...
}

and causes pyinstaller to look for hooks in all listed directories in addition to fbs/freeze/hooks.

Thank you for making fbs! Please let me know if this is the right approach to take. If so, I will go ahead and add a test.

@mherrmann
Copy link
Copy Markdown
Owner

Thank you very much for the PR. I'm happy to hear that you like fbs.

Your PR is similar to other requests I get sometimes. Namely, that people want to be able to pass additional command line parameters to PyInstaller. Another example of this is for instance #149.

So far, my stance on this has been to not expose PyInstaller-specific settings as part of fbs's API. The reason is that once I do this, I am forever tied to not just PyInstaller, but also to its very specific settings (which might change across PyInstaller versions).

Your request makes me think whether I shouldn't just sometime add one fbs setting, extra_pyinstaller_args. It would be very similar to this PR, except people would write

{
    "extra_pyinstaller_args": [
        "--additional-hooks-dir", "some_hooks",
        "--additional-hooks-dir", "some_more_hooks",
    ]
}

instead of your snippet. But as I said, this would (kind of) tie me (/fbs) forever to PyInstaller.

@mherrmann
Copy link
Copy Markdown
Owner

(Oh and see #149 for the currently recommended way of doing what you want to achieve.)

@mherrmann
Copy link
Copy Markdown
Owner

Implemented via extra_pyinstaller_args as described above in fbs release 0.8.9. Thanks!

@mherrmann mherrmann closed this Jul 29, 2020
@CLAassistant
Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

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.

3 participants