Skip to content

Build wheels as py3-none-{platform}. #20

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

Merged
merged 1 commit into from
Apr 1, 2025
Merged

Conversation

carlosperate
Copy link
Contributor

@carlosperate carlosperate commented Nov 24, 2023

Fixes #18

Based on https://github.com/joerick/python-ctypes-package-sample

CI job from my fork: https://github.com/carlosperate/libusb-package/actions/runs/6981684546

image

Seems to be working, but I would need to test it. Same question as #17 (comment), what would be the best way to test the wheels? Installing them in a virtual environemnt and running the test.py file?

@carlosperate
Copy link
Contributor Author

carlosperate commented Nov 24, 2023

A nice benefit is that it only needs to build the wheel the first time (cibuildwheel starts at the lowest Python version, so 3.7) and then skips building it for the next environments. This reduces the Ubuntu build time from 1h to 10min.

Once we have something like PR #21 set up, the test step wouldl still run on each environment, always using the wheel built on the first one.

@Salamist
Copy link
Collaborator

Salamist commented Apr 1, 2025

Hi @carlosperate looks awesome. Please give me some time to test these wheel on HW.

@carlosperate
Copy link
Contributor Author

That'd be great, thanks @Salamist!

I assume it's fine that the Python code included in the wheel might not be compatible with all Python 3 version (for example, if it uses features like f strings, then it'd be 3.6+, and things like that). As I think the py3-none should only be about the ABI, and so the python-requires version configures the Python code requirements, which it currently is to 3.7.

@carlosperate carlosperate marked this pull request as ready for review April 1, 2025 16:00
@Salamist Salamist merged commit 38268a9 into pyocd:main Apr 1, 2025
3 checks passed
@Salamist
Copy link
Collaborator

Salamist commented Apr 1, 2025

Hi @carlosperate
I've tried to install corresponding wheels on Win, Mac, and Linux for Python 3.9 and 3.13.
Everything works like a charm! :D By everything I mean running the test.py :D
Looking forward to #21

@carlosperate
Copy link
Contributor Author

Awesome, thanks @Salamist!

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.

Can the wheels from this package be Python 3 generic (not specifc to each Python version)?
2 participants