-
Notifications
You must be signed in to change notification settings - Fork 543
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
fix: incorrect abi parsing logic in wheel.py #1790
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
I found this as well, but I think the right fix would be to modify the starlark code that uses this. See #1744 where we pass target platforms to the wheel installer based on the wheel tags. |
Interesting, I would imagine none is also a valid abi flag and thus the wheel.py should be able to handle it correctly and thus the fix that I proposed. wdyt? |
Moreover, I notice there are some packages with names like this: protobuf-4.25.3-cp37-abi3-manylinux2014_aarch64.whl, which means we need to support this as well. |
I just took a second look, I believe we need to approach this issue differently. Firstly, it's important to distinguish between the abi_tag and the platform_tag. Modifying this in starlark would be incorrect because the absence of a specified ABI does not necessarily imply that the code is cross-platform. Therefore, we must still verify platform-specific dependencies. Secondly, I noticed that the abi3 tag poses a similar issue as well. This PR addresses and resolves the issue in a similar manner. |
My thinking about the code that we have is that the Let's say the user says I want to get dependencies for The special case where we get a wheel So in short, the bug that you found is because I assumed that |
Interesting, I'll close this then. thanks! |
This PR fixes the incorrect abi parsing logic. Currently, the logic would incorrectly assume the first item is not an abi for packages that do not specify an abi compatibility, e.g. watchdog-4.0.0-py3-none-manylinux2014_aarch64.whl. This would render the os incorrectly parsed, causing total build failures later on.