Skip to content

Conversation

@mayeut
Copy link
Member

@mayeut mayeut commented Jun 19, 2022

This extends the mechanism introduced in #1091 for abi3 wheels.
Most of the mentions to abi3 have been removed and replaced by a more generic compatible_wheel.
This allows to build a wheel foo-0.1-py3-none-win_amd64.whl only once and still test with every configured python.

relates to #1142

if not (interpreter.startswith("cp3") and tag.interpreter.startswith("cp3")):
continue
elif tag.abi == "none":
if tag.interpreter[:3] != "py3" and tag.interpreter[:3] != interpreter[:3]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line is confusing me... if the wheel tag doesn't start with 'py3', then we check that the part after that is different?

Also, (genuine question), why do we care about python interpreter version if abi is 'none'? To me, 'none' would mean that we don't actually use the Python C interface (e.g. a ctypes/cffi library) I suppose the obvious answer is "that's what packaging does", but I'm curious about the semantics of 'none'.

Copy link
Member Author

@mayeut mayeut Jun 26, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was sure cp35-none would be compatible with cp36, 37, ....
pip debug proves me wrong (or there's a bug in packaging).
I will restrict this to py3/py3y

This extends the mechanism introduced in pypa#1091 for `abi3` wheels.
Most of the mentions to `abi3` have been removed and replaced by a more generic `compatible_wheel`.
This allows to build a wheel `foo-0.1-py3-none-win_amd64.whl` only once and still test with every configured python.
@mayeut mayeut force-pushed the compatible-wheels branch from 61e9ddc to 0696c94 Compare June 26, 2022 09:32
@joerick
Copy link
Contributor

joerick commented Jun 28, 2022

I added an integration test for py3-none wheels, using ctypes. I was curious anyway about them, so it was a good chance to check them out. They're pretty cool actually - one wheel that works for all Pythons, including PyPy.

The test seems to pass, at least it did locally on linux. I'll check the execution time in case we want to disable some Python versions for performance. Setting up the test virtualenvs does slow the tests down that use CIBW_TEST_COMMAND. It might also be worth counting the number of times the test says "Building wheel..." versus "Found previously built wheel".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants