Closed johnwlambert closed 2 years ago
Hmm - odd - can you try using delocate==0.8.2 ? Do you see the same behavior?
Can you share the two wheels? (one before delocate was run and the one after?)
Thanks for the quick replies. I'm trying with 0.8.2 now.
This is the wheel after delocate was run, for python 3.8 (will need to unzip it):
Is/usr/local/opt/
a symlink to /usr/local/Cellar/
in your system?
I mean on the system where delocate was run.
I can check -- ~do you mean on the system where I built the wheels (Github Actions CI), or my local system where I am trying to install and use the wheel?~
locally, it appears to be, since i see:
ls -l /usr/local/opt/
/usr/local/opt/
total 0
lrwxr-xr-x 1 johnlambert admin 22 Aug 30 11:11 boost -> ../Cellar/boost/1.76.0
lrwxr-xr-x 1 johnlambert admin 22 Aug 30 11:11 boost@1.76 -> ../Cellar/boost/1.76.0
lrwxr-xr-x 1 johnlambert admin 30 Aug 30 10:58 ceres-solver -> ../Cellar/ceres-solver/2.0.0_4
lrwxr-xr-x 1 johnlambert admin 21 Aug 30 10:56 eigen -> ../Cellar/eigen/3.4.0
lrwxr-xr-x 1 johnlambert admin 26 Aug 30 10:53 freeimage -> ../Cellar/freeimage/3.18.0
lrwxr-xr-x 1 johnlambert admin 20 Aug 30 10:57 gcc -> ../Cellar/gcc/11.2.0
lrwxr-xr-x 1 johnlambert admin 20 Aug 30 10:57 gcc@11 -> ../Cellar/gcc/11.2.0
lrwxr-xr-x 1 johnlambert admin 19 Aug 30 10:57 gdbm -> ../Cellar/gdbm/1.20
lrwxr-xr-x 1 johnlambert admin 22 Aug 24 06:34 gettext -> ../Cellar/gettext/0.21
lrwxr-xr-x 1 johnlambert admin 22 Aug 30 10:42 gflags -> ../Cellar/gflags/2.2.2
lrwxr-xr-x 1 johnlambert admin 20 Aug 30 10:57 gfortran -> ../Cellar/gcc/11.2.0
@matthew-brett i confirmed and I see the same issue with delocate==0.8.2
For reference, if it helps, this is the entire script that builds the OSX wheel: https://github.com/johnwlambert/pycolmap-wheels/blob/main/build-macos-new.sh
@matthew-brett @isuruf here are the unrepaired wheels, if that's helpful: wheels-macos-python@3.8 (2).zip
This is a problem with delocate running realpath
on the dependency and trying to change install_names with the realpath instead of the symlinked path.
I see, is that expected behavior? Or something you recommend changing in the delocate source?
It should be fixed in delocate.
Thanks @isuruf. Could you point me to the files where you think this needs to be changed?
I see realpath
used in the following places:
https://github.com/matthew-brett/delocate/blob/master/delocate/libsana.py https://github.com/matthew-brett/delocate/blob/master/delocate/cmd/delocate_addplat.py https://github.com/matthew-brett/delocate/blob/master/delocate/cmd/delocate_listdeps.py https://github.com/matthew-brett/delocate/blob/master/delocate/delocating.py https://github.com/matthew-brett/delocate/blob/master/wheel_makers/make_wheels.sh
@johnwlambert - sorry - was stuck under a metaphorical rock, just coming back to this now.
Is it possible your module is a single top-level compiled file, and that you have hit https://github.com/matthew-brett/delocate/issues/15 ?
No problem, thanks @matthew-brett. I suppose there is a "single top-level" because there are just a few .cc pybind interface files at the top-level and a single setup.py file. There's actually no python source, besides setup.py. Here's the whole structure: https://github.com/mihaidusmanu/pycolmap
Right - at the moment Delocate doesn't handle modules without their own enclosing directory - that is what I am calling a top-level module. @HexDecimal has done some heroic refactoring recently - Kyle - do you have any ideas to handle this case properly? It's a common complaint, but previous solutions just seemed too difficult to maintain for my taste.
I think there are open pull requests trying to handle the top-level module issues. I don't think I'll suggest anything that hasn't already been talked about on those. I could look into them later.
Yes - the most recent PR was https://github.com/matthew-brett/delocate/pull/39 - started in 2018 (I hang my head in shame). You will see there that it touches quite a lot of the code you've refactored. No worries if no obvious path occurs, just let me know, I will have another look and another think.
@johnwlambert - @HexDecimal has nobly implemented (at last) this feature. Would you mind testing his current PR at https://github.com/matthew-brett/delocate/pull/123 ?
Hi, thanks for the excellent work and for creating this package.
I am seeing some unexpected behavior from delocate:
This creates the expected wheel and lists the following dependencies:
But when I
pip install
the wheel, and import the package, I see:the same occurs for glog, freeimage, ceres-solver, etc:
I can solve this by manually
brew install
ing each of these packages, but my understanding was thatdelocate
was supposed to be doing this for me. Any idea what is leading to this behavior?