Skip to content

Commit

Permalink
Merge branch 'develop' into nb_7_packages_m4
Browse files Browse the repository at this point in the history
  • Loading branch information
dimpase authored Feb 28, 2024
2 parents a37efc6 + acbe15d commit 31028cd
Show file tree
Hide file tree
Showing 364 changed files with 4,379 additions and 526,612 deletions.
30 changes: 12 additions & 18 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
<!-- ^^^^^
Please provide a concise, informative and self-explanatory title.
Don't put issue numbers in there, do this in the PR body below.
For example, instead of "Fixes #1234" use "Introduce new method to calculate 1+1"
-->
<!-- Describe your changes here in detail -->
<!-- ^ Please provide a concise and informative title. -->
<!-- ^ Don't put issue numbers in the title, do this in the PR description below. -->
<!-- ^ For example, instead of "Fixes #12345" use "Introduce new method to calculate 1 + 2". -->
<!-- v Describe your changes below in detail. -->
<!-- v Why is this change required? What problem does it solve? -->
<!-- v If this PR resolves an open issue, please link to it here. For example, "Fixes #12345". -->


<!-- Why is this change required? What problem does it solve? -->
<!-- If this PR resolves an open issue, please link to it here. For example "Fixes #12345". -->
<!-- If your change requires a documentation PR, please link it appropriately. -->

### :memo: Checklist

<!-- Put an `x` in all the boxes that apply. -->
<!-- If your change requires a documentation PR, please link it appropriately -->
<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
<!-- Feel free to remove irrelevant items. -->

- [ ] The title is concise, informative, and self-explanatory.
- [ ] The title is concise and informative.
- [ ] The description explains in detail what this PR is about.
- [ ] I have linked a relevant issue or discussion.
- [ ] I have created tests covering the changes.
- [ ] I have updated the documentation accordingly.

### :hourglass: Dependencies

<!-- List all open PRs that this PR logically depends on
- #12345: short description why this is a dependency
- #34567: ...
-->
<!-- List all open PRs that this PR logically depends on. For example, -->
<!-- - #12345: short description why this is a dependency -->
<!-- - #34567: ... -->


<!-- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
19 changes: 17 additions & 2 deletions .github/workflows/ci-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,26 @@ jobs:

strategy:
matrix:
os: [ubuntu, macos]
python: ['3.9', '3.10', '3.11']
# On pushes to tags or branches, test the whole matrix.
os: >-
${{ github.event_name == 'pull_request'
&& fromJson('["ubuntu"]')
|| fromJson('["ubuntu", "macos"]') }}
python: >-
${{ github.event_name == 'pull_request'
&& fromJson('["3.9"]')
|| fromJson('["3.9", "3.10", "3.11"]') }}
# Optional environment is disabled for now as its not yet working
# environment: [environment, environment-optional]
conda-env: [environment]
# On pull requests, only test two jobs:
# Ubuntu with Python 3.9, macOS with Python 3.10.
# Build & Test currently uses Python 3.11 (on ubuntu-focal).
# Together, they cover the supported minor Python versions.
include: >-
${{ github.event_name == 'pull_request'
&& fromJson('[{"os": "macos", "python": "3.10", "conda-env": "environment"}]')
|| fromJson('[]') }}
steps:
- uses: actions/checkout@v4
Expand Down
27 changes: 4 additions & 23 deletions .gitpod-setup-trac-remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,8 @@
# Exit on error
set -e

# Setup trac as remote
## In order to push to trac, generate a new key with `ssh-keygen -f tempkey` and save the private key to gitpod `gp env PRIVATE_SSH_KEY="$(<tempkey)"` (or by following https://www.gitpod.io/docs/environment-variables#using-the-account-settings)
## then follow https://doc.sagemath.org/html/en/developer/trac.html#linking-your-public-key-to-your-trac-account to register the public key with trac.
## Afterwards, create a new gitpod workspace.
git remote remove trac 2> /dev/null || true # might still exists from a previous run/prebuild
if [[ -n "${PRIVATE_SSH_KEY}" ]]; then
# Setup ssh key for authentication with trac
mkdir -p ~/.ssh
echo $PRIVATE_SSH_KEY | sed 's/\(-----\(BEGIN\|END\) OPENSSH PRIVATE KEY-----\)/\n\1\n/g' > ~/.ssh/id_rsa
sed -i '/^$/d' ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
echo "PubkeyAcceptedKeyTypes +ssh-rsa" > ~/.ssh/config
ssh-keyscan -H trac.sagemath.org >> ~/.ssh/known_hosts
git remote remove trac 2> /dev/null || true # might still exists from a previous run/prebuild

# Setup trac repo
git remote add trac git@trac.sagemath.org:sage.git -t master -t develop -t $(git branch --show-current)
git remote set-url --push trac git@trac.sagemath.org:sage.git
git fetch trac
git branch -u trac/$(git branch --show-current)
else
# Fallback to sagemath mirror
git remote add trac https://github.com/sagemath/sagetrac-mirror.git -t master -t develop
git remote set-url --push trac pushing-needs-ssh-key
fi
# Setup trac as remote
git remote add trac https://github.com/sagemath/sagetrac-mirror.git -t master -t develop
git remote set-url --push trac no-pushing--this-is-a-read-only-archive
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.beta8
version: 10.3.rc0
doi: 10.5281/zenodo.593563
date-released: 2024-02-13
date-released: 2024-02-25
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
10 changes: 5 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ environment.

All code is peer-reviewed, all functions must be documented and
unit-tested on a variety of platforms and systems. Python is used as a
base language, Git is used as the source code revision system, and
Trac is used to track all support/development issues. All of these
tools are very capable and used in many other small and large-scale
projects. From a software engineering standpoint, SageMath is a
wonderful project to be engaged in.
base language, and development takes place on GitHub, with Git as the
source code revision system. All of these tools are very capable and
used in many other small and large-scale projects. From a software
engineering standpoint, SageMath is a wonderful project to be engaged
in.

The mailing lists are extremely supportive and responsive. There are
several hundred people that have contributed code directly to SageMath
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ micro_release:

# Leaves everything that is needed to make the next "make" fast but removes
# all the cheap build artifacts that can be quickly regenerated.
# Trac #30960: We no longer uninstall sagelib.
# Issue #30960: We no longer uninstall sagelib.
fast-rebuild-clean: misc-clean
rm -rf upstream/
rm -rf build/pkgs/sagelib/src/build/temp.*
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.beta8, Release Date: 2024-02-13
SageMath version 10.3.rc0, Release Date: 2024-02-25
12 changes: 6 additions & 6 deletions build/bin/sage-bootstrap-python
Original file line number Diff line number Diff line change
Expand Up @@ -27,23 +27,23 @@ SAGE_ORIG_PATH=${NEW_PATH%%':'}
# So it needs to find a python that has the urllib module.
# For example, on Debian buster, the python3-minimal package does NOT provide it.
#
# Also, Trac #20023 removed the vendored argparse library from sage_bootstrap,
# Also, Issue #20023 removed the vendored argparse library from sage_bootstrap,
# so we test that python is new enough (>= 2.7) to run it.
#
# See https://github.com/sagemath/sage/issues/29090

# Trac #29890: Our first choice is "python", not "python3". This is to avoid
# Issue #29890: Our first choice is "python", not "python3". This is to avoid
# a defect of sage_bootstrap on macOS regarding SSL URLs.

# Trac #30177: Also check for hashlib.sha1 to guard against broken python2
# Issue #30177: Also check for hashlib.sha1 to guard against broken python2
# from old homebrew installations. Also check whether the current directory
# is accessible by this python; this is to guard on WSL against Pythons
# installed somewhere else in Windows.

# Trac #29285: Do not accept pythons that manipulate PATH, such as
# Issue #29285: Do not accept pythons that manipulate PATH, such as
# the shims provided by pyenv.

# Trac #30008: Make it work even if the environment tries to sabotage UTF-8
# Issue #30008: Make it work even if the environment tries to sabotage UTF-8
# operation in Python 3.0.x-3.6.x by setting LC_ALL=C or similar.

if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
Expand All @@ -54,7 +54,7 @@ if [ "$LC_ALL" = "C" -o "$LANG" = "C" -o "$LC_CTYPE" = "C" ]; then
fi

PYTHONS="python python3 python3.12 python3.11 python3.10 python3.9 python3.8 python3.7 python2.7 python3.6 python2"
# Trac #32405: Prefer a Python that provides ssl with SNI, which allows developers
# Issue #32405: Prefer a Python that provides ssl with SNI, which allows developers
# to download from upstream URLs (configure --enable-download-from-upstream-url),
# in particular from PyPI, which requires SNI.
for PY in $PYTHONS; do
Expand Down
4 changes: 2 additions & 2 deletions build/bin/sage-build-env
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,9 @@ if [ "x$SAGE_BUILD_ENV_SOURCED" = "x" ]; then
fi
fi

# Trac #31335: Avoid include paths leaking in from homebrew python3's distutils.cfg
# Issue #31335: Avoid include paths leaking in from homebrew python3's distutils.cfg
# by using setuptools' own copy of distutils instead of relying on stdlib distutils
# Trac #32944: Only do this on homebrew.
# Issue #32944: Only do this on homebrew.
if [ -n "$HOMEBREW" ]; then
export SETUPTOOLS_USE_DISTUTILS=local
fi
8 changes: 4 additions & 4 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ sdh_make_install() {
}

sdh_setup_bdist_wheel() {
# Trac #32046: Most uses of this function can be replaced by sdh_pip_install
# Issue #32046: Most uses of this function can be replaced by sdh_pip_install
mkdir -p dist
rm -f dist/*.whl
BDIST_DIR="$(mktemp -d)"
Expand Down Expand Up @@ -364,14 +364,14 @@ sdh_store_and_pip_install_wheel() {
echo "sdh_actually_pip_install_wheel $distname $pip_options -r \"\$SAGE_SPKG_SCRIPTS/\$PKG_BASE/spkg-requirements.txt\"" >> "$script_dir"/spkg-pipinst
else
if [ -n "$SAGE_DESTDIR" ]; then
# Trac #29585: Do the SAGE_DESTDIR staging of the wheel installation
# Issue #29585: Do the SAGE_DESTDIR staging of the wheel installation
# ONLY if SAGE_SUDO is set (in that case, we still do the staging so
# that we do not invoke pip as root).
# --no-warn-script-location: Suppress a warning caused by --root
local sudo=""
local root="--root=$SAGE_DESTDIR --no-warn-script-location"
elif [ -n "$SAGE_SUDO" ]; then
# Trac #32361: For script packages, we do have to invoke pip as root.
# Issue #32361: For script packages, we do have to invoke pip as root.
local sudo="$SAGE_SUDO"
local root=""
else
Expand All @@ -387,7 +387,7 @@ sdh_store_and_pip_install_wheel() {
sdh_actually_pip_install_wheel() {
distname=$1
shift
# Trac #32659: pip no longer reinstalls local wheels if the version is the same.
# Issue #32659: pip no longer reinstalls local wheels if the version is the same.
# Because neither (1) applying patches nor (2) local changes (in the case
# of sage-conf, sage-setup, etc.) bump the version number, we need to
# override this behavior. The pip install option --force-reinstall does too
Expand Down
2 changes: 1 addition & 1 deletion build/bin/sage-pip-install
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ PIP=pip3
# running pip. This is implemented in the Python script sage-flock
LOCK="$SAGE_VENV/var/lock/$PIP.lock"

# Trac #33155: Pythons installed using the python.org macOS installers
# Issue #33155: Pythons installed using the python.org macOS installers
# for Python < 3.10 identify macOS Big Sur and newer as "10.16", causing
# pip to refuse to install wheels tagged macosx_11_0_x86_64
export SYSTEM_VERSION_COMPAT=0
Expand Down
6 changes: 3 additions & 3 deletions build/bin/sage-spkg
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
#*****************************************************************************

# Avoid surprises with character ranges [a-z] in regular expressions
# See Trac #15791; some locales can produce different results for
# See Issue #15791; some locales can produce different results for
# character ranges; using C.UTF-8 to ensure UTF-8 default encoding in Python
# introduces extra complications, see #30053, so we don't do it, but
# assume we are on Python3.x, for x at least 7.
Expand Down Expand Up @@ -162,7 +162,7 @@ write_to_tty()
}

# Handle -n, -t, -q options for recursive make
# See Trac #12016.
# See Issue #12016.
if echo "$MAKE $MAKEFLAGS -$MAKEFLAGS" |grep '[ ]-[A-Za-z]*[qnt]' >/dev/null; then
if echo "$MAKE $MAKEFLAGS -$MAKEFLAGS" |grep '[ ]-[A-Za-z]*q' >/dev/null; then
# Pretend the target is *not* up-to-date
Expand Down Expand Up @@ -436,7 +436,7 @@ for dir in "$SAGE_SPKG_INST" "$SAGE_SPKG_SCRIPTS" "$SAGE_BUILD_DIR"; do
fi
done

# Trac #5852: check write permissions
# Issue #5852: check write permissions
if [ ! -w "$SAGE_BUILD_DIR" ]; then
error_msg "Error: no write access to build directory $SAGE_BUILD_DIR"
exit 1
Expand Down
48 changes: 20 additions & 28 deletions build/bin/sage-spkg-info
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,21 @@ if [ -n "$OUTPUT_RST" ]; then
issue () { echo ":issue:\`$1\`"; }
code () { echo "\`\`$*\`\`"; }
tab () { echo ".. tab:: $1"; }
FORMAT=rst
else
ref () { echo "$1"; }
spkg () { echo "$1"; }
issue () { echo "https://github.com/sagemath/sage/issues/$1"; }
code () { echo "$1"; }
tab () { echo "$1:"; }
FORMAT=plain
fi
PKG_SCRIPTS="$SAGE_ROOT/build/pkgs/$PKG_BASE"
if ! props=$(sage-package properties --format=shell $PKG_BASE 2> /dev/null); then
echo >&2 "sage-spkg-info: unknown package $PKG_BASE"
exit 1
fi
eval "$props"
eval PKG_SCRIPTS=\$path_$PKG_BASE
for ext in rst txt; do
SPKG_FILE="$PKG_SCRIPTS/SPKG.$ext"
if [ -f "$SPKG_FILE" ]; then
Expand All @@ -44,30 +51,7 @@ echo
echo "Dependencies"
echo "------------"
echo
dep=
for dep_file in dependencies dependencies_order_only; do
if [ -r "$PKG_SCRIPTS/$dep_file" ] ; then
for dep in $(sed 's/^ *//; s/ *#.*//; q' "$PKG_SCRIPTS/$dep_file"); do
case "$dep" in
# Do not use order-only syntax, too much information
\|) ;;
# Suppress dependencies on source file of the form $(SAGE_ROOT)/..., $(SAGE_SRC)/...
\$\(SAGE_*) ;;
# Suppress FORCE
FORCE) ;;
# Dependencies like $(BLAS)
\$\(*) echo "- $dep";;
# Looks like a package
*) if [ -r "$SAGE_ROOT/build/pkgs/$dep/SPKG.rst" ]; then
# This RST label is set in src/doc/bootstrap
echo "- $(spkg $dep)"
else
echo "- $dep"
fi;;
esac
done
fi
done
sage-package dependencies --format=$FORMAT $PKG_BASE
echo
echo "Version Information"
echo "-------------------"
Expand Down Expand Up @@ -155,9 +139,17 @@ else
echo "If the system package is installed, $(code ./configure) will check if it can be used."
fi
else
echo "However, these system packages will not be used for building Sage"
echo "because $(code spkg-configure.m4) has not been written for this package;"
echo "see $(issue 27330)"
case $PKG_BASE in
_*)
# Suppress the message, as it makes no sense for these special packages
# (_bootstrap, _sagemath)
;;
*)
echo "However, these system packages will not be used for building Sage"
echo "because $(code spkg-configure.m4) has not been written for this package;"
echo "see $(issue 27330) for more information."
;;
esac
fi
fi
echo
6 changes: 3 additions & 3 deletions build/make/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ else
AM_V_at =
endif

# Trac #33125: Handle make options -n, -t, -q
# Issue #33125: Handle make options -n, -t, -q
ifeq ($(strip $(foreach flag,n t q,$(findstring $(flag),$(filter-out --%,$(MAKEFLAGS))))),)
PLUS = +
else
Expand Down Expand Up @@ -326,7 +326,7 @@ all-toolchain: base-toolchain
# typical Python packages from source. Wheel packages only need pip.
PYTHON_TOOLCHAIN = setuptools pip setuptools_scm wheel flit_core hatchling

# Trac #32056: Avoid installed setuptools leaking into the build of python3 by uninstalling it.
# Issue #32056: Avoid installed setuptools leaking into the build of python3 by uninstalling it.
# It will have to be reinstalled anyway because of its dependency on $(PYTHON).
python3-SAGE_LOCAL-no-deps: setuptools-clean
python3-SAGE_VENV-no-deps: setuptools-clean
Expand Down Expand Up @@ -582,7 +582,7 @@ pkg_deps = \
# For packages listed in $(TOOLCHAIN_DEPS) we also pass --keep-existing to
# sage-spkg, and --keep-files to sage-spkg-uninstall since those packages can
# have a recursive self-dependency, and should not be deleted while upgrading.
# See Trac #25857
# See Issue #25857

# Positional arguments:
# $(1): package name
Expand Down
2 changes: 1 addition & 1 deletion build/make/install
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fi

# Make the special target _clean-broken-gcc before trying to build any other
# packages. This is necessary if configure detected a broken GCC installed
# in Sage; Trac #25011
# in Sage; Issue #25011
$MAKE _clean-broken-gcc

# If "make" doesn't understand the -q option (although we require
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/_prereq/distros/opensuse.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ gcc-c++
ca-certificates
# gunzip needed for ppl spkg
gzip
# Trac #32368
# Issue #32368
findutils
diffutils
2 changes: 1 addition & 1 deletion build/pkgs/_sagemath/SPKG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ including documentation and Jupyter.
Downstream Contact
------------------

See :trac:`Trac wiki page Distribution <wiki/Distribution>`
See `wiki page Distribution <https://github.com/sagemath/sage/wiki/Distribution>`_
2 changes: 1 addition & 1 deletion build/pkgs/_sagemath/distros/debian.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
sagemath
sagemath-doc-en
sagemath-doc
sagemath-jupyter
Loading

0 comments on commit 31028cd

Please sign in to comment.