Open maxhgerlach opened 2 years ago
I know this bug report is a bit old but came across this today whilst packaging an existing CMake project into a wheel. It hapens because delocate
doesn't take account of the final locations of files installed into the "data" folder in the wheel, as these go directly into the root of the environment.
Describe the bug / To Reproduce My original wheel contains these files:
It depends on Boost, ICU, and PCRE, which have been installed via Homebrew:
I call
delocate-wheel
like this:The dylibs are properly copied into the delocated wheel:
The output of
delocate-listdeps
looks reasonable at first sight:However,
otool -L
shows me these relative paths:Note all the relative paths
@loader_path/../../../PyMyLib.dylibs
. While these match the files as they are placed inside the wheel archive, afterpip install
these relative paths don't point to the dylibs under site-packages:Note how
PyMyLib.cpython-39-darwin.so
and__init__.py
have been installed directly toPyMyLib/
, not toPyMyLib-0.1.17.data/purelib/PyMyLib/
(as it looks in the wheel archive).Consequently, I get import errors because the dynamic libraries are not found:
Expected behavior
delocate-wheel
should set relative paths to dylibs in such a way that they agree with their ultimate location afterpip install
.Wheels used Unfortunately not open source. But the
__init__.py
contains just these lines:Platform (please complete the following information):
Additional context I actually don't know why our (cmake-based) build process produces wheels with these subdirectories
PyMyLib-0.1.17.data/purelib
. Pointers that could help me simplify that would also be appreciated. 🙂