Skip to content

Build wheels for Python 3.12. #625

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 3 commits into from
Oct 8, 2023

Conversation

dainnilsson
Copy link
Contributor

This updates the python-build workflow to use the latest version of cibuildwheel and build wheels for the newly released Python 3.12.

@axxel
Copy link
Collaborator

axxel commented Oct 5, 2023

Thanks. I have two comments:

  1. Could you also change the line

    python-version: ['3.9', '3.10', '3.11']
    accordingly? Disclaimer, I don't know if this would actually work a.t.m. i.e. whether or not the CI environment already supports python 3.12

  2. I decided in the past to only "support" / deliver prebuild wheels for most current 3 versions, which would mean dropping 3.9. Any thoughts on that practice?

@dainnilsson
Copy link
Contributor Author

dainnilsson commented Oct 5, 2023

  1. Yeah, absolutely! I can confirm that 3.12 is supported by setup-python already. I'll push a new commit for that.
  2. Certainly not a problem for me. I suppose if you wanted to maximize support then all officially supported python versions might be nice to support (3.8 and up) but that would obviously mean 5 concurrent versions at the moment. If nobody has "complained" about the lack of 3.8 support thus far, then I'd guess nobody would miss 3.9 either.

EDIT: The python-build workflow also currently uses Python 3.9 to build the source distribution and install cibuildwheel. I take it these should be bumped to 3.10 if 3.9 is dropped?

@axxel
Copy link
Collaborator

axxel commented Oct 6, 2023

Thinking about this some more I now believe that we should do the following:

  1. have python-build keep 3.9 (or maybe even add 3.8 if that is still officially supported)
  2. have CI only build with one python version, say 3.12

Reasoning:

  • I've never seen that only a single python version from CI failed.
  • The python-build is currently separate because it takes so much time, so it is only run near the next release. If it takes even longer, that does not really make much of a difference to me.
  • That said, for people who just want to download wheels from PyPi, it makes a substantial difference if they have to setup a c++ build environment just to build the wheel from the source package.

@dainnilsson
Copy link
Contributor Author

Your reasoning sounds fine to me, I'll update the PR!

Use Python 3.12 to build the source package and run tests.
@dainnilsson
Copy link
Contributor Author

I've now made the above changes, and tested to make sure both the ci and python-build workflows run successfully. I had to add an explicit step to install setuptools , which I believe was previously automatically added with pip, but no longer is.

@axxel axxel merged commit 1be2180 into zxing-cpp:master Oct 8, 2023
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