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

Various documentation updates [skip ci] #8214

Merged
merged 3 commits into from Jan 7, 2024
Merged

Conversation

rokm
Copy link
Member

@rokm rokm commented Jan 7, 2024

Update the introduction in Understanding PyInstaller Hooks. Replace the minimal hook example - instead of outdated hook for dnspython (hook-dns.rdata.py, which is now part of contributed hooks repository anyway), use hook for stdlib xml.dom.domreg module, which is shipped by core PyInstaller, and is also easier to comment on. Closes #8118.

Update the section on macOS app bundles under Using PyInstaller to reflect the current layout of generated app bundles - i.e., the MacOS directory containing only the executable, binaries being placed in the Frameworks directory, cross-linking of content between Frameworks and Resources, etc. Add a note to discourage users from generating onefile .app bundles. Closes #8119.

Lastly, add a new chapter called Common Issues and Pitfalls that covers topics such as launching external programs from frozen application (i.e., the need to sanitize library search paths before doing so), use of multiprocessing (i.e., the elusive multiprocessing.freeze_support), symlinks in POSIX builds on non-Windows (implications for copying onedir applications or creating zip archives; temporary directory requirements for onefile builds), sys.stderr and sys.stdout being None in Windows noconsole builds.

Update the introduction section of the Understanding PyInstaller
Hooks - change the minimal hook example from hook for `dnspython`
(`hook-dns.rdata.py`) to hook for `xml.dom.domreg.py` module from
Python standard libary.

Add URLs for browsing the hooks available in both `PyInstaller`
and `pyinstaller-hooks-contrib` repositories.
Update the section on macOS app bundles under Using PyInstaller
to reflect the current layout of generated app bundles - i.e., the
MacOS directory containing only the executable, binaries being
placed in the Frameworks directory, cross-linking of content
between Frameworks and Resources, etc.

Add a note to discourage users from generating onefile .app
bundles.
@rokm rokm force-pushed the docs-update branch 2 times, most recently from dcf64ab to 0c7c886 Compare January 7, 2024 15:24
doc/common-issues-and-pitfalls.rst Outdated Show resolved Hide resolved
doc/common-issues-and-pitfalls.rst Outdated Show resolved Hide resolved
Add a new documentation chapter, "Common Issues and Pitfalls" which
at the moment covers the following topics:

Frozen applications on macOS and Linux making use of symbolic
links since PyInstaller 6.0, and the implications for distribution
(e.g., taking care that symlinks are preserved when copying the
frozen application or creating an archive).

Launching external programs from the frozen application; provides
the explanation of why launching external applications requires
manual sanitization oflibrary search paths, and how to achieve it.
Primary goal is to document the modifications of libary-search-path
related environment variables - both by bootloader, and potentially
also by run-time hooks. But we also need to mention that on
Windows, `SetDllDirectory()` is used, and that in order to undo
its effects, `SetDllDirectory(NULL)` call is needed...

Multi-processing; document and explain the need for calling
`multiprocessing.freeze_support` when using `multiprocessing`
functionality.

Windowed/noconsole mode on Windows; explain that in noconsole
builds on Windows, standard I/O file handles are `None`, and
provide a work-around for code that naively tries to access
their attributes without first checking that they are available.
@rokm rokm merged commit ee44bbb into pyinstaller:develop Jan 7, 2024
@rokm rokm deleted the docs-update branch January 7, 2024 19:40
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

update docs to reflect MacOS app bundle changes Hooks documentation dnspython example outdated
2 participants