serge-sans-paille / pythran

Ahead of Time compiler for numeric kernels
https://pythran.readthedocs.io
BSD 3-Clause "New" or "Revised" License
1.99k stars 193 forks source link

No support for Python 3.12 #2204

Closed haampie closed 4 months ago

haampie commented 5 months ago

I see some claims that pythran supports Python 3.12, but it uses distutils so it doesn't:

https://github.com/serge-sans-paille/pythran/blob/b37f5842aa22239dec078e4c05427e2f08da5e1f/pythran/run.py#L13

causing

ModuleNotFoundError: No module named 'distutils'

when running pythran --version.

This happens for example in scipy during meson configure, resulting in build failure.

Code changes are required to continue to use distutils, you cannot rely on import distutils to work even if you add a dummy dependency on setuptools. See https://github.com/cython/cython/pull/5754#issuecomment-1752102480 for why not.

serge-sans-paille commented 5 months ago

Thanks for the report. I believe #2205 fixes most of the issues (?)

haampie commented 4 months ago

Fixes it :+1:

serge-sans-paille commented 4 months ago

Fixed by #2205

haampie commented 4 months ago

Hi @serge-sans-paille, would it make sense to backport this in a patch release? Does pythran have patch releases?

serge-sans-paille commented 4 months ago

no patch release, but I plan a release in the forthcoming weeks, I need to have a look at https://github.com/serge-sans-paille/pythran/issues/2203 first though.