Nuitka resolves prebuilt module from watchfiles lib on macOS wrong
See original GitHub issueProblem: compilation of app in which watchiles library is used(just import is enough) fails on macOS. Nuitka resolves a module to _rust_notify.cpython-310-darwin.so
, but library file is _rust_notify.abi3.so
. If I create a copy of _rust_notify.abi3.so
with file name _rust_notify.cpython-310-darwin.so
before compilation, it doesn’t fail anymore, and the app works.
Watchfiles is a library implemented in Rust, and its distribution includes the prebuilt module _rust_notify.
On Linux and Windows, the compilation is successful, and the app works as expected.
Repository with minimal example and CI: https://github.com/Aksem/nuitka_compile_watchfiles_bug
Environment:
1.1.5
Commercial: None
Python: 3.10.7 (main, Sep 6 2022, 15:18:47) [Clang 12.0.0 (clang-1200.0.32.29)]
Flavor: Unknown
Executable: /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/bin/python
OS: Darwin
Arch: x86_64
Nuitka version: tested both 1.1.5 and factory versions. Installed in pyenv environment via poetry.
Compilation error:
FATAL: Error, failed to find path @rpath/_rust_notify.cpython-310-darwin.so (resolved DLL to /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/lib/python3.10/site-packages/watchfiles/_rust_notify.cpython-310-darwin.so) for /Users/runner/Library/Caches/pypoetry/virtualenvs/nuitka-load-module-regression-cKtR2lP0-py3.10/lib/python3.10/site-packages/watchfiles/_rust_notify.abi3.so, please report the bug.
Issue Analytics
- State:
- Created a year ago
- Comments:9 (6 by maintainers)
Top GitHub Comments
Fixed in maturin(rust toolset) as well: https://github.com/PyO3/maturin/pull/1208
This is part of the hotfix release 1.1.6 that I just made.