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

users can pass additional_hooks_dir to pyinstaller #157

Closed

Conversation

NileGraddis
Copy link

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.

@claassistantio
Copy link

claassistantio commented Dec 4, 2019

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.

@mherrmann
Copy link
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
Owner

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

@mherrmann
Copy link
Owner

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

@mherrmann mherrmann closed this Jul 29, 2020
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