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

Support abi3 wheels #32

Merged
merged 2 commits into from
Sep 17, 2024

Conversation

tomjakubowski
Copy link
Contributor

@tomjakubowski tomjakubowski commented Sep 6, 2024

Hey there! I am working on a Maturin wheel built for abi3 and wasm32-emscripten-unknown, something which appears to work in Pyodide. I'm coming at this as a Rust developer, not really too knowledgable about Python, so most of what I know about abi3 is from the PyO3 documentation: https://pyo3.rs/v0.14.5/features.html#abi3

My understanding is that abi3 wheels are forwards compatible, meaning an abi3-py39 wheel will work with Python 3.9, 3.10, 3.11, 3.12, and so on. Empirically I can say our abi3-py39 wheel works just fine in Pyodide v0.26.2 (with some recent bugfixes I have recently done to perspective's build).

This PR adds support for abi3 wheels so that they can be added to pyodide-lock.json files. I added some test cases to test_wheel.py, happy to add more tests if needed elsewhere

abi3 is also known as the stable ABI https://docs.python.org/3/c-api/stable.html#stable-abi

@tomjakubowski tomjakubowski force-pushed the feature/support-abi3-wheels branch 2 times, most recently from 2a7d6b5 to 55ac35e Compare September 6, 2024 05:33
@tomjakubowski
Copy link
Contributor Author

tomjakubowski commented Sep 6, 2024

This doesn't appear to actually produce a pyodide-lock patched with the package though… investigating.

edit: this was just a bug in my test script, never mind =)

@tomjakubowski tomjakubowski force-pushed the feature/support-abi3-wheels branch 2 times, most recently from 2616cbc to f2bdfef Compare September 6, 2024 05:54
Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks! Could you please update the changelog?

@tomjakubowski
Copy link
Contributor Author

tomjakubowski commented Sep 16, 2024

Certainly! Amended the commit to update the CHANGELOG.

edit: updated to correct the changelog entry so it goes under "unreleased"

abi3 is also known as the stable ABI https://docs.python.org/3/c-api/stable.html#stable-abi

abi3 wheels are forwards compatible, meaning an abi3-py39 wheel will
work with Python 3.9, 3.10, 3.11, 3.12, and so on.
@ryanking13 ryanking13 merged commit 24b049c into pyodide:main Sep 17, 2024
3 checks passed
@tomjakubowski tomjakubowski deleted the feature/support-abi3-wheels branch September 17, 2024 02:03
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.

2 participants