Skip to content

Commit

Permalink
sagemathgh-37270: Allow python 3.12 and scipy 1.12
Browse files Browse the repository at this point in the history
    
This is a minimal PR to allow building with python 3.12, given the
circumstances surrounding sagemath#36181.

I've tested this works with system python 3.12 by:
```
./bootstrap
./configure --disable-doc --disable-editable --enable-system-site-
packages
env 'MAKE=make -j36' make
./sage -tp 36 --all
./sage -tp 36 --all --long
```

It only gave the expected failures in
`src/sage/matroids/database_collections.py` from sagemath#37140.

Since scipy 1.12 works ok after sagemath#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

- [x] The title is concise, informative, and self-explanatory.
- [x] The description explains in detail what this PR is about.
- [x] I have linked a relevant issue or discussion.

EDIT: rebased on top of sagemath#36983 to address reviewer suggestion.
    
URL: sagemath#37270
Reported by: Gonzalo Tornaría
Reviewer(s): Aliaksei Urbanski, Gonzalo Tornaría, Tobias Diez
  • Loading branch information
Release Manager committed Feb 11, 2024
2 parents d3deb28 + cbde6e7 commit 75afadb
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/pkgs/python3/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ By default, Sage will try to use system's ``python3`` to set up a virtual
environment, a.k.a. `venv <https://docs.python.org/3.10/library/venv.html>`_
rather than building a Python 3 installation from scratch.

Sage will accept versions 3.9.x to 3.11.x.
Sage will accept versions 3.9.x to 3.12.x.

You can also use ``--with-python=/path/to/python3_binary`` to tell Sage to use
``/path/to/python3_binary`` to set up the venv. Note that setting up the venv requires
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/python3/spkg-configure.m4
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ SAGE_SPKG_CONFIGURE([python3], [
m4_pushdef([MIN_VERSION], [3.9.0])
m4_pushdef([MIN_NONDEPRECATED_VERSION], [3.9.0])
m4_pushdef([LT_STABLE_VERSION], [3.12.0])
m4_pushdef([LT_VERSION], [3.12.0])
m4_pushdef([LT_VERSION], [3.13.0])
AC_ARG_WITH([python],
[AS_HELP_STRING([--with-python=PYTHON3],
[Python 3 executable to use for the Sage venv; default: python3])])
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/scipy/install-requires.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# deprecations cannot be introduced in micro releases.
# SciPy devs wait "at least 6 months", "in practice two (minor) releases"
# from deprecation to removal of a feature.
scipy >=1.5, <1.12
scipy >=1.5
2 changes: 1 addition & 1 deletion m4/pyproject_toml_metadata.m4
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ classifiers = [
"Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
requires-python = ">=3.9, <3.12"
requires-python = ">=3.9, <3.13"
2 changes: 1 addition & 1 deletion pkgs/sage-setup/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ classifiers = [
"Topic :: Scientific/Engineering :: Mathematics",
]
urls = {Homepage = "https://www.sagemath.org"}
requires-python = ">=3.9, <3.12"
requires-python = ">=3.9, <3.13"
dependencies = []
dynamic = ["version"]

Expand Down
2 changes: 1 addition & 1 deletion src/setup.cfg.m4
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license_files = LICENSE.txt
include(`setup_cfg_metadata.m4')dnl'

[options]
python_requires = >=3.9, <3.12
python_requires = >=3.9, <3.13
install_requires =
SPKG_INSTALL_REQUIRES_sage_conf
SPKG_INSTALL_REQUIRES_six
Expand Down

0 comments on commit 75afadb

Please sign in to comment.