Skip to content

Commit

Permalink
Merge branch 'develop' into trac_to_issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kwankyu committed Mar 5, 2024
2 parents 837ddc8 + cb8e15b commit ad8fe87
Show file tree
Hide file tree
Showing 70 changed files with 411 additions and 267 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ jobs:
uses: ./.github/workflows/macos.yml
with:
stage: "1"
timeout: 14400

stage-2:
uses: ./.github/workflows/macos.yml
Expand Down Expand Up @@ -90,7 +91,7 @@ jobs:
run: |
git config --global user.email "nobody@example.com"
git config --global user.name "Sage GitHub CI"
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(git describe --tags) || echo "(ignoring error)"
SAGE_ROOT=. SAGE_SRC=./src src/bin/sage-update-version $(cat src/VERSION.txt).dev0 || echo "(ignoring error)"
- name: make dist
run: |
./configure --enable-download-from-upstream-url && make dist
Expand All @@ -108,7 +109,7 @@ jobs:
fail-fast: false
max-parallel: 4
matrix:
os: [ macos-11, macos-12 ]
os: [ macos-11, macos-12, macos-14 ]
tox_system_factor: [macos-nobootstrap]
tox_packages_factor: [minimal]
xcode_version_factor: [default]
Expand All @@ -129,7 +130,7 @@ jobs:
if: contains(matrix.tox_system_factor, 'nobootstrap')
- name: Move homebrew away
run: |
(cd /usr/local && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
(cd $(brew --prefix) && for a in bin etc include lib opt sbin share; do sudo mv $a $a-moved; done)
- name: Select Xcode version
run: |
if [ ${{ matrix.xcode_version_factor }} != default ]; then sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode_version_factor }}.app; fi
Expand All @@ -140,7 +141,8 @@ jobs:
# We use a high parallelization on purpose in order to catch possible parallelization bugs in the build scripts.
# For doctesting, we use a lower parallelization to avoid timeouts.
run: |
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
(sleep 20000; pkill make) &
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
- name: Prepare logs artifact
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
Expand Down
33 changes: 24 additions & 9 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,21 @@ on:
type: string
# System configuration
osversion_xcodeversion_toxenv_tuples:
# As of 2024-02, "runs-on: macos-latest" is macos-12.
# and "runs-on: macos-14" selects the new M1 runners.
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories
description: 'Stringified JSON object'
default: >-
[["latest", "", "homebrew-macos-usrlocal-minimal"],
["latest", "", "homebrew-macos-usrlocal-standard"],
["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"],
[["11", "xcode_13.2.1", "homebrew-macos-usrlocal-minimal"],
["12", "", "homebrew-macos-usrlocal-minimal"],
["12", "", "homebrew-macos-usrlocal-standard"],
["12", "", "homebrew-macos-usrlocal-python3_xcode-standard"],
["12", "", "homebrew-macos-usrlocal-maximal"],
["13", "xcode_15.0", "homebrew-macos-usrlocal-standard"],
["latest", "", "homebrew-macos-usrlocal-maximal"],
["latest", "", "homebrew-macos-usrlocal-python3_xcode-standard"],
["14", "", "homebrew-macos-opthomebrew-standard"],
["latest", "", "conda-forge-macos-minimal"],
["latest", "", "conda-forge-macos-standard"]]
["latest", "", "conda-forge-macos-standard"],
["14", "", "conda-forge-macos-standard"]]
type: string
extra_sage_packages:
description: 'Extra Sage packages to install as system packages'
Expand All @@ -41,6 +45,10 @@ on:
free_disk_space:
default: false
type: boolean
timeout:
description: 'Elapsed time (seconds) at which to kill the build'
default: 20000
type: number
#
# For use in upstream CIs.
#
Expand Down Expand Up @@ -74,10 +82,16 @@ jobs:
repository: ${{ inputs.sage_repo }}
ref: ${{ inputs.sage_ref }}
fetch-depth: 10000

- uses: actions/setup-python@v5
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
id: python
with:
python-version: "3.8 - 3.12"
update-environment: false
- name: Install test prerequisites
run: |
brew install tox
"${{ steps.python.outputs.python-path }}" -m pip install pipx
- name: Download upstream artifact
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -129,7 +143,8 @@ jobs:
*) export TARGETS_PRE="${{ inputs.targets_pre }}" TARGETS="${{ inputs.targets }} TARGETS_OPTIONAL="${{ inputs.targets_optional }}
;;
esac
MAKE="make -j12" tox -e $TOX_ENV -- SAGE_NUM_THREADS=4 $TARGETS
(sleep ${{ inputs.timeout }}; pkill make) &
MAKE="make -j12" EXTRA_SAGE_PACKAGES="${{ inputs.extra_sage_packages }}" "${{ steps.python.outputs.python-path }}" -m pipx run tox -e $TOX_ENV -- SAGE_NUM_THREADS=6 $TARGETS
- name: Prepare logs artifact
run: |
mkdir -p "artifacts/$LOGS_ARTIFACT_NAME"; cp -r .tox/*/log "artifacts/$LOGS_ARTIFACT_NAME"
Expand Down
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.rc2
doi: 10.5281/zenodo.593563
date-released: 2024-02-25
date-released: 2024-03-04
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.rc2, Release Date: 2024-03-04
24 changes: 14 additions & 10 deletions build/pkgs/cmake/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
SAGE_SPKG_CONFIGURE(
[cmake], [
AC_CACHE_CHECK([for cmake >= 3.11], [ac_cv_path_CMAKE], [
AC_PATH_PROGS_FEATURE_CHECK([CMAKE], [cmake], [
cmake_version=`$ac_path_CMAKE --version 2>&1 \
| $SED -n -e 's/cmake version *\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)/\1/p'`
AS_IF([test -n "$cmake_version"], [
AX_COMPARE_VERSION([$cmake_version], [ge], [3.11], [
ac_cv_path_CMAKE="$ac_path_CMAKE"
ac_path_CMAKE_found=:
SAGE_SPKG_CONFIGURE([cmake], [dnl
AC_CACHE_CHECK([for cmake >= 3.11], [ac_cv_path_CMAKE], [dnl
dnl Do not accept cmake installed via https://pypi.org/project/cmake/
dnl in the default user scheme; it will not work in our venv because
dnl we set PYTHONUSERBASE in sage-env.
WITH_SAGE_PYTHONUSERBASE([dnl
AC_PATH_PROGS_FEATURE_CHECK([CMAKE], [cmake], [dnl
cmake_version=`$ac_path_CMAKE --version 2>&1 \
| $SED -n -e 's/cmake version *\([[0-9]]*\.[[0-9]]*\.[[0-9]]*\)/\1/p'`
AS_IF([test -n "$cmake_version"], [dnl
AX_COMPARE_VERSION([$cmake_version], [ge], [3.11], [dnl
ac_cv_path_CMAKE="$ac_path_CMAKE"
ac_path_CMAKE_found=:
])
])
])
])
Expand Down
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=ff35813eb1168b754ab9470066b39aeaca9d462c
md5=834bc382880b0cfea48fa00bdff79534
cksum=4002007446
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
872ca39ec422cacd1005dd6b1ccd9737d5d88712
1 change: 1 addition & 0 deletions build/pkgs/dsdp/spkg-install.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
cd src
cp ../patches/CMakeLists.txt .
sdh_cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DBUILD_SHARED_LIBS=ON \
-DBLA_VENDOR=OpenBLAS \
-DBLAS_LIBRARIES="$(pkg-config --libs blas)" \
Expand Down
21 changes: 18 additions & 3 deletions build/pkgs/flint/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
SAGE_SPKG_CONFIGURE([flint], [
SAGE_SPKG_DEPCHECK([mpfr], [
AC_CHECK_HEADER(flint/flint.h, [
AC_CHECK_HEADER(flint/flint.h, [dnl
dnl gr_get_fexpr appears in Flint 3.0
AC_SEARCH_LIBS([gr_get_fexpr], [flint], [], [sage_spkg_install_flint=yes])
AC_SEARCH_LIBS([gr_get_fexpr], [flint], [dnl
dnl Flint 3.1 is too new
AC_MSG_CHECKING([whether FLINT version is >= 3.1.0])
AC_COMPILE_IFELSE([dnl
AC_LANG_PROGRAM([[#include <flint/flint.h>
#if __FLINT_RELEASE >= 30100
# error "FLINT 3.1 is too new"
#endif
]])
], [dnl
AC_MSG_RESULT([no])
], [dnl
AC_MSG_RESULT([yes; too new])
sage_spkg_install_flint=yes
])
], [sage_spkg_install_flint=yes])
], [sage_spkg_install_flint=yes])
])
], [], [], [
], [], [], [dnl
if test x$sage_spkg_install_flint = xyes; then
AC_SUBST(SAGE_FLINT_PREFIX, ['$SAGE_LOCAL'])
else
Expand Down
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.

30 changes: 17 additions & 13 deletions build/pkgs/ninja_build/spkg-configure.m4
Original file line number Diff line number Diff line change
@@ -1,16 +1,20 @@
SAGE_SPKG_CONFIGURE(
[ninja_build], [
dnl meson_python needs 1.8.2 or later
AC_CACHE_CHECK([for ninja >= 1.8.2], [ac_cv_path_NINJA], [
AC_PATH_PROGS_FEATURE_CHECK([NINJA], [ninja], [
dnl support both two- and three-component version schemes
dnl since samurai (a ninja alternative) uses two
ninja_version=`$ac_path_NINJA --version 2>&1 \
| $SED -n -e 's/\([[0-9]]*\(\.[[0-9]]*\)\{1,2\}\).*/\1/p'`
AS_IF([test -n "$ninja_version"], [
AX_COMPARE_VERSION([$ninja_version], [ge], [1.8.2], [
ac_cv_path_NINJA="$ac_path_NINJA"
ac_path_NINJA_found=:
SAGE_SPKG_CONFIGURE([ninja_build], [dnl
dnl meson_python needs 1.8.2 or later
AC_CACHE_CHECK([for ninja >= 1.8.2], [ac_cv_path_NINJA], [dnl
dnl Do not accept ninja installed from https://pypi.org/project/ninja/
dnl in the default user scheme; it will not work in our venv because
dnl we set PYTHONUSERBASE in sage-env.
WITH_SAGE_PYTHONUSERBASE([dnl
AC_PATH_PROGS_FEATURE_CHECK([NINJA], [ninja], [dnl
dnl support both two- and three-component version schemes
dnl since samurai (a ninja alternative) uses two
ninja_version=`$ac_path_NINJA --version 2>&1 \
| $SED -n -e 's/\([[0-9]]*\(\.[[0-9]]*\)\{1,2\}\).*/\1/p'`
AS_IF([test -n "$ninja_version"], [dnl
AX_COMPARE_VERSION([$ninja_version], [ge], [1.8.2], [
ac_cv_path_NINJA="$ac_path_NINJA"
ac_path_NINJA_found=:
])
])
])
])
Expand Down
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
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.3rc2
Loading

0 comments on commit ad8fe87

Please sign in to comment.