Allow python 3.12 and scipy 1.12#37270
Conversation
…4: Use setuptools instead of distutils for extensions tests on Python >= 3.12
|
This is missing the changes from #36983, so this will only work with system python 3.12 that has resurrected distuils. |
I don't have "resurrected distutils" and it works. |
|
we're entering a delightful subject of Python (without Monty) theology. What's resurrection of distutils? |
|
I rebased it on top of #36983. But I don't like this workflow of adding "dependent PRs" and it makes this PR harder to review. |
Well, distutils was killed in CPython 3.12. |
|
All joking aside, it is of course |
|
All joking aside: is this good now? |
tobiasdiez
left a comment
There was a problem hiding this comment.
Thanks! Looks good to me. Feel free to set it to "positive review" once the remark by @Jamim is committed.
Co-authored-by: Aliaksei Urbanski <[email protected]>
3840e1b to
cbde6e7
Compare
|
Apologies for the force-push. I replaced the last commit by an identical one except for my email address since github used a incorrect one. |
|
Documentation preview for this PR (built with commit cbde6e7; changes) is ready! 🎉 |
sagemathgh-37287: sagemath-standard: include sage_setup in sdist This makes it so that `sage_setup` is included in `sagemath_standard` for convenience and ease of installation. Having `sage_setup` as a separate distribution leads to chicken-and-egg problem. For example, this is what happens when I try to build `sagemath-standard` from sagemath#37270: ``` cd pkgs/sagemath-standard $ python -m build -s * Creating venv isolated environment... * Installing packages in isolated environment... (cypari2 >=2.1.1, cysignals >=1.10.2, cython >=3.0, != 3.0.3, <4.0, gmpy2 ~=2.1.b999, jinja2 >=3.0, jupyter_core >=4.6.3, memory_allocator, numpy >=1.19, pkgconfig, pplpy >=0.8.6, sage-conf ~= 10.3b7, sage-setup ~= 10.3b7, sage_setup[autogen], setuptools >= 68.1.1, wheel >=0.36.2) [... snip ...] ERROR: Could not find a version that satisfies the requirement sage- setup~=10.3b7 (from versions: 9.4rc1) ERROR: No matching distribution found for sage-setup~=10.3b7 [...] ``` This is because the version of sage-setup which is available on pypi requires python <= 3.11. Even if the branch I'm trying to build allows python 3.12, I cannot use it. The main idea of this change is that `sagemath-standard` sdists are self-contained and include the exact matching version of sage-setup. The self-contained part is good for the pypi sdist, but the matching version allows for greater flexibility when testing, given that the implementations of `sagemath-standard/setup.py` and `sage_setup` are so intrincately connected and really need to match. ### 📝 Checklist - [x] The title is concise, informative, and self-explanatory. - [x] The description explains in detail what this PR is about. URL: sagemath#37287 Reported by: Gonzalo Tornaría Reviewer(s): Dima Pasechnik, Tobias Diez
This is a minimal PR to allow building with python 3.12, given the
circumstances surrounding #36181.
I've tested this works with system python 3.12 by:
It only gave the expected failures in
src/sage/matroids/database_collections.pyfrom #37140.Since scipy 1.12 works ok after #37123 and it's just a one-liner to
change the required version, I included it here.
No attempt is made at upgrading anything in sage-the-distro.
📝 Checklist
EDIT: rebased on top of #36983 to address reviewer suggestion.