Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup: clean up and simplify
get_hooks_dirs
entry-point
The package's implementation of `get_hook_dirs` currently returns the following paths: ``` [ '[...]/_pyinstaller_hooks_contrib/hooks/stdhooks', '[...]/_pyinstaller_hooks_contrib/hooks/stdhooks/__pycache__', '[...]/_pyinstaller_hooks_contrib/hooks/rthooks', '[...]/_pyinstaller_hooks_contrib/hooks/rthooks/__pycache__', '[...]/_pyinstaller_hooks_contrib/hooks', ] ``` whereas only ``` [ '[...]/_pyinstaller_hooks_contrib/hooks/stdhooks', '[...]/_pyinstaller_hooks_contrib/hooks', ] ``` would suffice. The first path is required because we use non-standard layout for standard hooks - normally, PyInstaller expects them to be in the top-level hooks directory. All other hooks are discovered based on the top-level hooks directory (the second path), including the run-time hooks; PyInstaller looks for `rthooks.dat` in the hooks directory, and assumes that hooks themselves are stored in `rthooks` directory next to the `rthooks.dat` file. Clean up and simplify the path computation code. Remove the sub-directory search part, as we are not using sub-directories to further organize hooks of a particular type.
- Loading branch information