-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
hooks: fix pkgutil.iter_modules when paths involve symbolic links
In our pkgutil.iter_module replacement, we need to fully resolve both the sys._MEIPASS and the given search paths, in case either contains a symbolic link. Failing to do so leads to path mis-match when symbolic links are involved and the given search paths are already fully resolved. This may happen on macOS with onefile builds if the caller of pkgutil.iter_module fully resolves the search path(s) before calling the function (issue #6537). Add a test that reproduces scenario from #6537.
- Loading branch information
Showing
4 changed files
with
37 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Fix handling of symbolic links in the path matching part of the | ||
PyInstaller's ``pkgutil.iter_modules`` replacement/override. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters