Open MAKOMO opened 1 month ago
Unsure what to do here. I don't have the tools to inspect these files. I might need to raise this issue upstream to ronaldoussoren/macholib.
In theory the native CLI otool
could be used instead of macholib
. _get_macos_min_version
is small and could be rewritten by someone with experience.
For now I added an except to cover this ValueError returning None. The reason for the troubles here might be that some of those numpy binaries are generated from Fortran code which might generate wired headers. However, those binary things are mostly an unknown field for me.
_is_macho_file
performs a very simple magic number check so I wonder how easily this can be a false positive.
https://github.com/matthew-brett/delocate/blob/b0c37814ae51a0f8ccef0678b4d61173f9a59919/delocate/tools.py#L173
Could do what you did and rely on the exceptions from macholib
instead of this _is_macho_file
check, but I'm unsure about how reliable this would be. Would be too easy to suppress something important.
If the headers are unusual then that's definitely something I should report upstream.
Describe the bug A ValueError is thrown by macholib on trying to get the determine the macOS min version on applying delocate-merge to numpy 2.1.1 arm & x86_64 wheels downloaded from PyPip for macOS
To Reproduce
Expected behavior A successful merge
Wheels used If a wheel is involved then consider attaching the original wheel (before being delocated) or linking to the repository where the original wheel can be created.
https://files.pythonhosted.org/packages/6b/6c/a9fbef5fd2f9685212af2a9e47485cde9357c3e303e079ccf85127516f2d/numpy-2.1.1-cp312-cp312-macosx_11_0_arm64.whl
https://files.pythonhosted.org/packages/36/11/c573ef66c004f991989c2c6218229d9003164525549409aec5ec9afc0285/numpy-2.1.1-cp312-cp312-macosx_10_9_x86_64.whl
Platform (please complete the following information):