Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into scip_9
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Mar 3, 2024
2 parents b76407e + 4ac7152 commit 6df0931
Show file tree
Hide file tree
Showing 62 changed files with 316 additions and 224 deletions.
4 changes: 2 additions & 2 deletions CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ title: SageMath
abstract: SageMath is a free open-source mathematics software system.
authors:
- name: "The SageMath Developers"
version: 10.3.rc0
version: 10.3.rc1
doi: 10.5281/zenodo.593563
date-released: 2024-02-25
date-released: 2024-02-29
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
45 changes: 38 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -420,16 +420,47 @@ in the Installation Guide.
Alternative Installation using PyPI
---------------

For installation of `sage` in python using `pip` you need to install `sagemath-standard`. First, activate your python virtual environment and follow these steps:
For installing Sage in a Python environment from PyPI, Sage provides the
`pip`-installable package [sagemath-standard](https://pypi.org/project/sagemath-standard/).

$ python3 -m pip install sage_conf
$ ls $(sage-config SAGE_SPKG_WHEELS)
$ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup
$ python3 -m pip install --no-build-isolation sagemath-standard
Unless you need to install Sage into a specific existing environment, we recommend
to create and activate a fresh virtual environment, for example `~/sage-venv/`:

You need to install `sage_conf`, a wheelhouse of various python packages. You can list the wheels using `ls $(sage-config SAGE_SPKG_WHEELS)`. After manual installation of these wheels, you can install the sage library, `sagemath-standard`.
$ python3 -m venv ~/sage-venv
$ source ~/sage-venv/bin/activate

**NOTE:** You can find `sage` and `sagemath` pip packages but with these packages, you will encounter `ModuleNotFoundError`.
As the first installation step, install [sage_conf](https://pypi.org/project/sage-conf/),
which builds various prerequisite packages in a subdirectory of `~/.sage/`:

(sage-venv) $ python3 -m pip install -v sage_conf

After a successful installation, a wheelhouse provides various Python packages.
You can list the wheels using the command:

(sage-venv) $ ls $(sage-config SAGE_SPKG_WHEELS)

If this gives an error saying that `sage-config` is not found, check any messages
that the `pip install` command may have printed. You may need to adjust your `PATH`,
for example by:

$ export PATH="$(python3 -c 'import sysconfig; print(sysconfig.get_path("scripts", "posix_user"))'):$PATH"

Now install the packages from the wheelhouse and the [sage_setup](https://pypi.org/project/sage-conf/)
package, and finally install the Sage library:

(sage-venv) $ python3 -m pip install $(sage-config SAGE_SPKG_WHEELS)/*.whl sage_setup
(sage-venv) $ python3 -m pip install --no-build-isolation -v sagemath-standard

The above instructions install the latest stable release of Sage.
To install the latest development version instead, add the switch `--pre` to all invocations of
`python3 -m pip install`.

**NOTE:** PyPI has various other `pip`-installable packages with the word "sage" in their names.
Some of them are maintained by the SageMath project, some are provided by SageMath users for
various purposes, and others are entirely unrelated to SageMath. Do not use the packages
`sage` and `sagemath`. For a curated list of packages, see the chapter
[Packages and Features](https://doc.sagemath.org/html/en/reference/spkg/index.html) of the
Sage Reference Manual.

SageMath Docker images
----------------------
Expand Down
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.3.rc0, Release Date: 2024-02-25
SageMath version 10.3.rc1, Release Date: 2024-02-29
6 changes: 3 additions & 3 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
tarball=configure-VERSION.tar.gz
sha1=a3fc8c3bf9198d28a8f2d5a08cffdcf519150b77
md5=32f4f1763765232dc7e7431d5e48e129
cksum=708121316
sha1=b0dfc1d5886366b5c58354527810c1dbeffd78a3
md5=c2f9837bcf2823d5b2f36063ebeedb38
cksum=3535625335
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0fb793fa91a0b46de452036b521cbbaeee878340
686e933eb32ade977ed51836a33424e2095e5408
10 changes: 5 additions & 5 deletions build/pkgs/meson/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
tarball=meson-VERSION.tar.gz
sha1=97e766951553ec35315712f0a27d5554a010d4c3
md5=69da4c63ef06c9d3bcc00ce89abb306f
cksum=2424401184
upstream_url=https://pypi.io/packages/source/m/meson/meson-VERSION.tar.gz
tarball=meson-VERSION-py3-none-any.whl
sha1=baf5b9bc9ca97f18c7dc87cfaf0e1dc4d617a4cf
md5=d418e644c04e55872ce3d7b6de007dbe
cksum=559088366
upstream_url=https://pypi.io/packages/py3/m/meson/meson-VERSION-py3-none-any.whl
2 changes: 1 addition & 1 deletion build/pkgs/meson/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.3
1.3.1
28 changes: 17 additions & 11 deletions build/pkgs/meson/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
SAGE_SPKG_CONFIGURE(
[meson], [
dnl scipy 1.11.2 needs meson >= 1.1.0
dnl contourpy needs meson >= 1.2.0
AC_CACHE_CHECK([for meson >= 1.2.0], [ac_cv_path_MESON], [
AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [
meson_version=`$ac_path_MESON --version 2>&1`
AS_IF([test -n "$meson_version"], [
AX_COMPARE_VERSION([$meson_version], [ge], [1.2.0], [
ac_cv_path_MESON="$ac_path_MESON"
ac_path_MESON_found=:
SAGE_SPKG_CONFIGURE([meson], [dnl
dnl scipy 1.11.2 needs meson >= 1.1.0
dnl contourpy needs meson >= 1.2.0
dnl meson_python needs meson >= 1.2.3 for Python >= 3.12
AC_CACHE_CHECK([for meson >= 1.2.3], [ac_cv_path_MESON], [dnl
dnl Do not accept meson installed in the default user scheme;
dnl it will not work in our venv because we set PYTHONUSERBASE
dnl in sage-env.
WITH_SAGE_PYTHONUSERBASE([dnl
AC_PATH_PROGS_FEATURE_CHECK([MESON], [meson], [dnl
AS_IF([meson_version=$($ac_path_MESON --version 2>&1)], [dnl
AS_IF([test -n "$meson_version"], [dnl
AX_COMPARE_VERSION([$meson_version], [ge], [1.2.3], [dnl
ac_cv_path_MESON="$ac_path_MESON"
ac_path_MESON_found=:
])
])
])
])
])
Expand Down
2 changes: 0 additions & 2 deletions build/pkgs/meson/spkg-install.in

This file was deleted.

2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-conf ~= 10.3rc0
sage-conf ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-docbuild ~= 10.3rc0
sage-docbuild ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-setup ~= 10.3rc0
sage-setup ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sage-sws2rst ~= 10.3rc0
sage-sws2rst ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-standard ~= 10.3rc0
sagemath-standard ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_bliss/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-bliss ~= 10.3rc0
sagemath-bliss ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-categories ~= 10.3rc0
sagemath-categories ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_coxeter3/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-coxeter3 ~= 10.3rc0
sagemath-coxeter3 ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-environment ~= 10.3rc0
sagemath-environment ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_mcqd/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-mcqd ~= 10.3rc0
sagemath-mcqd ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_meataxe/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-meataxe ~= 10.3rc0
sagemath-meataxe ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-objects ~= 10.3rc0
sagemath-objects ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-repl ~= 10.3rc0
sagemath-repl ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_sirocco/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-sirocco ~= 10.3rc0
sagemath-sirocco ~= 10.3rc1
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_tdlib/install-requires.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file is updated on every release by the sage-update-version script
sagemath-tdlib ~= 10.3rc0
sagemath-tdlib ~= 10.3rc1
56 changes: 31 additions & 25 deletions m4/sage_python_package_check.m4
Original file line number Diff line number Diff line change
Expand Up @@ -71,32 +71,19 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
)
AC_MSG_CHECKING([for python package $1 ("${SAGE_PKG_VERSPEC}")])
dnl To prevent user-site (pip install --user) packages from being
dnl detected as "system" packages, we poison PYTHONUSERBASE. The
dnl sage-env script also does this at runtime; we mimic that
dnl implementation to ensure that the behaviors at ./configure and
dnl runtime are identical. Beware that (as in sage-env) the poisoning
dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
dnl user points PYTHONUSERBASE to any path (even the default), then
dnl his local pip packages will be detected.
PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
AS_IF([test -z "${PYTHONUSERBASE}"], [
PYTHONUSERBASE="${HOME}/.sage/local"
WITH_SAGE_PYTHONUSERBASE([dnl
dnl double-quote SAGE_PKG_VERSPEC because platform-specific
dnl dependencies like python_version<'3.11' will have single
dnl quotes in them. (We normalized the quotes earlier with sed.)
AS_IF(
[config.venv/bin/python3 -c dnl
"import pkg_resources; dnl
pkg_resources.require(\"${SAGE_PKG_VERSPEC}\".splitlines())" dnl
2>&AS_MESSAGE_LOG_FD],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
)
])
dnl double-quote SAGE_PKG_VERSPEC because platform-specific
dnl dependencies like python_version<'3.11' will have single
dnl quotes in them. (We normalized the quotes earlier with sed.)
AS_IF(
[PYTHONUSERBASE="${PYTHONUSERBASE}" config.venv/bin/python3 -c dnl
"import pkg_resources; dnl
pkg_resources.require(\"${SAGE_PKG_VERSPEC}\".splitlines())" dnl
2>&AS_MESSAGE_LOG_FD],
[AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no); sage_spkg_install_$1=yes]
)
PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
], [
dnl failed to create a venv for some reason
AC_MSG_RESULT(no)
Expand Down Expand Up @@ -128,3 +115,22 @@ AC_DEFUN([SAGE_PYTHON_PACKAGE_CHECK], [
AS_IF([test "${sage_use_system_$1}" = "yes"],[sage_use_system_$1=no])
])
])


AC_DEFUN([WITH_SAGE_PYTHONUSERBASE], [dnl
dnl To prevent user-site (pip install --user) packages from being
dnl detected as "system" packages, we poison PYTHONUSERBASE. The
dnl sage-env script also does this at runtime; we mimic that
dnl implementation to ensure that the behaviors at ./configure and
dnl runtime are identical. Beware that (as in sage-env) the poisoning
dnl is skipped if PYTHONUSERBASE is non-empty. In particular, if the
dnl user points PYTHONUSERBASE to any path (even the default), then
dnl his local pip packages will be detected.
PYTHONUSERBASE_SAVED="${PYTHONUSERBASE}"
AS_IF([test -z "${PYTHONUSERBASE}"], [dnl
PYTHONUSERBASE="${HOME}/.sage/local"
export PYTHONUSERBASE
])
$1
PYTHONUSERBASE="${PYTHONUSERBASE_SAVED}"
])
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
19 changes: 8 additions & 11 deletions pkgs/sage-conf/_sage_conf/__main__.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,19 @@
# Entry point 'sage-config'. It does not depend on any packages.

from sage_conf import *

def _main():
from argparse import ArgumentParser
from sys import exit, stdout
parser = ArgumentParser()

import sage_conf

parser = ArgumentParser(prog='sage-config')
parser.add_argument('--version', help="show version", action="version",
version='%(prog)s ' + VERSION)
version='%(prog)s ' + sage_conf.VERSION)
parser.add_argument("VARIABLE", nargs='?', help="output the value of VARIABLE")
args = parser.parse_args()
d = globals()
if args.VARIABLE:
stdout.write('{}\n'.format(d[args.VARIABLE]))
stdout.write('{}\n'.format(getattr(sage_conf, args.VARIABLE)))
else:
for k, v in d.items():
for k in dir(sage_conf):
if not k.startswith('_'):
stdout.write('{}={}\n'.format(k, v))

if __name__ == "__main__":
_main()
stdout.write('{}={}\n'.format(k, getattr(sage_conf, k)))
4 changes: 4 additions & 0 deletions pkgs/sage-conf/sage_conf.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
from _sage_conf._conf import *
from _sage_conf.__main__ import _main


if __name__ == "__main__":
_main()
2 changes: 1 addition & 1 deletion pkgs/sage-conf_conda/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sage-conf_pypi/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-bliss/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-coxeter3/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-mcqd/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-meataxe/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-sirocco/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion pkgs/sagemath-tdlib/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
2 changes: 1 addition & 1 deletion src/.relint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,4 @@
magic doctest comments should appear on the "sage:" line, not "....:" lines
# see optional_regex in src/sage/doctest/parsing.py
# "indirect doctest" is from src/bin/sage-coverage
pattern: '^[ ]*[.][.][.][.]:.*#.*(arb216|arb218|py2|py3|long time|not implemented|not tested|known bug|optional|indirect doctest)'
pattern: '^[ ]*[.][.][.][.]:.*#.*(py2|py3|long time|not implemented|not tested|known bug|optional|indirect doctest)'
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.3.rc0
10.3.rc1
6 changes: 3 additions & 3 deletions src/bin/sage-version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
# which stops "setup.py develop" from rewriting it as a Python file.
:
# This file is auto-generated by the sage-update-version script, do not edit!
SAGE_VERSION='10.3.rc0'
SAGE_RELEASE_DATE='2024-02-25'
SAGE_VERSION_BANNER='SageMath version 10.3.rc0, Release Date: 2024-02-25'
SAGE_VERSION='10.3.rc1'
SAGE_RELEASE_DATE='2024-02-29'
SAGE_VERSION_BANNER='SageMath version 10.3.rc1, Release Date: 2024-02-29'
8 changes: 0 additions & 8 deletions src/sage/doctest/control.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,6 @@

auto_optional_tags = set()

try:
from sage.libs.arb.arb_version import version as arb_vers
arb_tag = 'arb2' + arb_vers().split('.')[1]
auto_optional_tags.add(arb_tag)
except ImportError:
pass


class DocTestDefaults(SageObject):
"""
This class is used for doctesting the Sage doctest module.
Expand Down
Loading

0 comments on commit 6df0931

Please sign in to comment.