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
bindepend: suppress missing library messages for macOS system libraries #5464
bindepend: suppress missing library messages for macOS system libraries #5464
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A NEWs fragment would be needed IMO.
# we do not collect system libraries on any macOS version | ||
# anyway, so suppress the corresponding error messages. | ||
if not in_system_path(lib): | ||
logger.error('Can not find path %s (needed by %s)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logger.error('Can not find path %s (needed by %s)', | |
logger.error('Cannot find path %s (needed by %s)', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I was thinking about changing the message. But then, it would need to be changed in other places for consistency, and that makes it out-of-scope for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressing such tiny issue when the code is changed seems reasonable. But yes, this is a very small thing to consider, it is OK for me if you change it or not :)
Starting with macOS Big Sur, the system libraries are hidden. This results in a slew of error messages about missing libraries when a shared library is scanned for imports. However, all these error messages are harmless, because we avoid collecting system libraries on macOS, nor do we need to further analyze them for dependencies (as they can depend only on other system libraries). Therefore, suppress the missing-library error messages for system libraries.
413c0c0
to
cb70096
Compare
Out of curiosity, how does |
It should be version-agnostic, as it's just checking the path prefix. |
Also, Github actions now allow you to set |
I've triggered a run on a branch in my fork: https://github.com/rokm/pyinstaller/actions/runs/493923759 |
Hmm, in hindsight we probably should have loosened the max of 3 failures rule.
This is still a lot better than I'd hoped. I was expecting every second test to pop and die. I'd guess that the 1st error is to be expected. libc will now be hidden. def test_ctypes_util_find_library(monkeypatch):
# for lind_library() we need a lib actually existing on the system
if is_win:
libname = "KERNEL32"
else:
libname = "c"
code = "ctypes.util.find_library('%s')" % libname
res = __scan_code_for_ctypes(code, monkeypatch)
assert res |
Well, the good news is that in the full run, only those three tests fail:
And yeah, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice 👍.
Starting with macOS Big Sur, the system libraries are hidden. This results in a slew of error messages about missing libraries when
a shared library is scanned for imports. However, all these error messages are harmless, because we avoid collecting system libraries on macOS, nor do we need to further analyze them for dependencies (as they can depend only on other system libraries). Therefore, suppress the missing-library error messages for system libraries.
Closes #5107.