Skip to content
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

--require-archs shall check all mach-O files in the wheel #132

Open
mayeut opened this issue Nov 14, 2021 · 1 comment
Open

--require-archs shall check all mach-O files in the wheel #132

mayeut opened this issue Nov 14, 2021 · 1 comment

Comments

@mayeut
Copy link
Contributor

mayeut commented Nov 14, 2021

Is your feature request related to a problem? Please describe.
delocate-wheel --require-archs arm64,x86_64 is not enforced for executables, at least, already present in the wheel being repaired. This is not intuitive and I wonder if this is a bug or a feature ?

Describe the solution you'd like
I'd like --require-archs to be enforced on all mach-O files in the wheel.

Describe alternatives you've considered
worked around by extracting the wheel & checking files "manually" with lipo -verify_arch

Additional context
scikit-build/ninja-python-distributions#88
scikit-build/ninja-python-distributions#90

Invalid wheel being generated: https://files.pythonhosted.org/packages/95/7c/ce1487f88a00e43825a73d5395adc8e200af06c08017b204efe6c3ff8992/ninja-1.10.2.2-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl

@HexDecimal
Copy link
Collaborator

I'd consider it a bug.

The problem is how delocate.delocating.check_archs takes the tree_libs variable, but that variable only tracks dependencies which will be copied and does not consider that any other files could have architectures. Any files which have architectures but don't rely on non-system libraries outside of the wheel will be missed by check_archs which is why --require-archs fails.

check_archs should be modified to take a directory and iterate over every file in it.

@HexDecimal HexDecimal added the bug label Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants