Skip to content

Commit

Permalink
Merge branch 'p/38285/add-version-selector-top' into p/38332/improve-…
Browse files Browse the repository at this point in the history
…announcement-banner
  • Loading branch information
kwankyu committed Jul 5, 2024
2 parents 9b272c0 + 663dc45 commit ed3e1f1
Show file tree
Hide file tree
Showing 67 changed files with 126 additions and 160 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.4.rc1
version: 10.4.rc2
doi: 10.5281/zenodo.8042260
date-released: 2024-06-27
date-released: 2024-07-04
repository-code: "https://github.com/sagemath/sage"
url: "https://www.sagemath.org/"
2 changes: 1 addition & 1 deletion VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SageMath version 10.4.rc1, Release Date: 2024-06-27
SageMath version 10.4.rc2, Release Date: 2024-07-04
36 changes: 20 additions & 16 deletions build/bin/sage-dist-helpers
Original file line number Diff line number Diff line change
Expand Up @@ -205,25 +205,16 @@ sdh_make_install() {
sdh_die "Error installing $PKG_NAME"
}

sdh_setup_bdist_wheel() {
# 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)"
python3 setup.py --no-user-cfg \
bdist_wheel --bdist-dir "$BDIST_DIR" \
"$@" || sdh_die "Error building a wheel for $PKG_NAME"
}

sdh_pip_install() {
echo "Installing $PKG_NAME"
sdh_build_wheel() {
mkdir -p dist
rm -f dist/*.whl
export PIP_NO_INDEX=1
install_options=""
build_options=""
# pip has --no-build-isolation but no flag that turns the default back on...
build_isolation_option=""
# build has --wheel but no flag that turns the default (build sdist and then wheel) back on
dist_option="--wheel"
export PIP_FIND_LINKS="$SAGE_SPKG_WHEELS"
unset PIP_NO_BINARY
while [ $# -gt 0 ]; do
Expand All @@ -243,6 +234,9 @@ sdh_pip_install() {
export PIP_NO_BINARY=:all:
build_isolation_option="--no-isolation --skip-dependency-check"
;;
--sdist-then-wheel)
dist_option=""
;;
--no-deps)
install_options="$install_options $1"
;;
Expand All @@ -258,20 +252,20 @@ sdh_pip_install() {
esac
shift
done
if python3 -m build --wheel --outdir=dist $build_isolation_option $build_options "$@"; then
if python3 -m build $dist_option --outdir=dist $build_isolation_option $build_options "$@"; then
: # successful
else
case $build_isolation_option in
*--no-isolation*)
sdh_die "Error building a wheel for $PKG_NAME"
;;
*)
echo >&2 "Warning: building with \"python3 -m build --wheel --outdir=dist $build_isolation_option $build_options $@\" failed."
echo >&2 "Warning: building with \"python3 -m build $dist_option --outdir=dist $build_isolation_option $build_options $@\" failed."
unset PIP_FIND_LINKS
export PIP_NO_BINARY=:all:
build_isolation_option="--no-isolation --skip-dependency-check"
echo >&2 "Retrying with \"python3 -m build --wheel --outdir=dist $build_isolation_option $build_options $@\"."
if python3 -m build --wheel --outdir=dist $build_isolation_option $build_options "$@"; then
echo >&2 "Retrying with \"python3 -m build $dist_option --outdir=dist $build_isolation_option $build_options $@\"."
if python3 -m build $dist_option --outdir=dist $build_isolation_option $build_options "$@"; then
echo >&2 "Warning: Wheel building needed to use \"$build_isolation_option\" to succeed. This means that a dependencies file in build/pkgs/ needs to be updated. Please report this to sage-devel@googlegroups.com, including the build log of this package."
else
sdh_die "Error building a wheel for $PKG_NAME"
Expand All @@ -282,6 +276,16 @@ sdh_pip_install() {
unset PIP_FIND_LINKS
unset PIP_NO_BINARY
unset PIP_NO_INDEX
}

sdh_build_and_store_wheel() {
sdh_build_wheel "$@"
sdh_store_wheel .
}

sdh_pip_install() {
echo "Installing $PKG_NAME"
sdh_build_wheel "$@"
sdh_store_and_pip_install_wheel $install_options .
}

Expand Down
4 changes: 2 additions & 2 deletions build/pkgs/configure/checksums.ini
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
tarball=configure-VERSION.tar.gz
sha1=7e1e01d82e171303935202d5876e0c109d431f8b
sha256=eec0d494a20c6eff61a1ccc679cca149efd78cb191f88ade0446468b45abee00
sha1=1451031f1325bb7d31929b92415ee25795ed7022
sha256=a5c2064d5c792d32bbfa6c97a72aab395764ed7882f9bcadb8f04ca34c42c6b4
2 changes: 1 addition & 1 deletion build/pkgs/configure/package-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19bd20218effcdb6b242bfb18b113ff85c6d8497
812a1160c06c055f74f9fcc86a7678c5a7a8788c
9 changes: 0 additions & 9 deletions build/pkgs/sage_conf/spkg-install.in

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/sage_conf/spkg-install.in
2 changes: 1 addition & 1 deletion build/pkgs/sage_conf/version_requirements.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.4rc1
sage-conf ~= 10.4rc2
9 changes: 0 additions & 9 deletions build/pkgs/sage_docbuild/spkg-install.in

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/sage_docbuild/spkg-install.in
2 changes: 1 addition & 1 deletion build/pkgs/sage_docbuild/version_requirements.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.4rc1
sage-docbuild ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ cd src
if [ "$SAGE_EDITABLE" = yes ]; then
sdh_pip_editable_install .
if [ "$SAGE_WHEELS" = yes ]; then
sdh_setup_bdist_wheel && sdh_store_wheel .
sdh_build_and_store_wheel --no-isolation .
fi
else
sdh_pip_install .
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sage_setup/version_requirements.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.4rc1
sage-setup ~= 10.4rc2
9 changes: 0 additions & 9 deletions build/pkgs/sage_sws2rst/spkg-install.in

This file was deleted.

1 change: 1 addition & 0 deletions build/pkgs/sage_sws2rst/spkg-install.in
2 changes: 1 addition & 1 deletion build/pkgs/sage_sws2rst/version_requirements.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.4rc1
sage-sws2rst ~= 10.4rc2
7 changes: 3 additions & 4 deletions build/pkgs/sagelib/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ export SAGE_ROOT=/doesnotexist
export SAGE_SRC=/doesnotexist
export SAGE_SRC_ROOT=/doesnotexist
export SAGE_DOC_SRC=/doesnotexist
export SAGE_BUILD_DIR=/doesnotexist

# We also poison all directories below SAGE_LOCAL.
# We also poison all directories below SAGE_LOCAL
# except for SAGE_SPKG_SCRIPTS, which is needed by sage-dist-helpers
export SAGE_PKGCONFIG=/doesnotexist
export SAGE_SPKG_SCRIPTS=/doesnotexist
export SAGE_SHARE=/doesnotexist

# However, we only unset SAGE_LOCAL and SAGE_PKG_CONFIG_PATH.
Expand All @@ -53,7 +52,7 @@ if [ "$SAGE_EDITABLE" = yes ]; then

if [ "$SAGE_WHEELS" = yes ]; then
# Additionally build a wheel (for use in other venvs)
cd $SAGE_PKGS/sagelib/src && time sdh_setup_bdist_wheel && sdh_store_wheel .
cd $SAGE_PKGS/sagelib/src && time sdh_build_and_store_wheel --no-build-isolation .
fi
else
# Now implied: "$SAGE_WHEELS" = yes
Expand Down
2 changes: 1 addition & 1 deletion build/pkgs/sagelib/version_requirements.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.4rc1
sagemath-standard ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_bliss/version_requirements.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.4rc1
sagemath-bliss ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_categories/version_requirements.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.4rc1
sagemath-categories ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_coxeter3/version_requirements.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.4rc1
sagemath-coxeter3 ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_environment/version_requirements.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.4rc1
sagemath-environment ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_mcqd/version_requirements.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.4rc1
sagemath-mcqd ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_meataxe/version_requirements.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.4rc1
sagemath-meataxe ~= 10.4rc2
6 changes: 1 addition & 5 deletions build/pkgs/sagemath_objects/spkg-install.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,4 @@ export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS"
# https://pypa-build.readthedocs.io/en/latest/#python--m-build
# (Important because sagemath-objects uses MANIFEST.in for filtering.)
# Do not install the wheel.
DIST_DIR="$(mktemp -d)"
python3 -m build --outdir "$DIST_DIR"/dist . || sdh_die "Failure building sdist and wheel"

wheel=$(cd "$DIST_DIR" && sdh_store_wheel . >&2 && echo $wheel)
ls -l "$wheel"
sdh_build_and_store_wheel --sdist-then-wheel .
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_objects/version_requirements.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.4rc1
sagemath-objects ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_repl/version_requirements.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.4rc1
sagemath-repl ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_sirocco/version_requirements.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.4rc1
sagemath-sirocco ~= 10.4rc2
2 changes: 1 addition & 1 deletion build/pkgs/sagemath_tdlib/version_requirements.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.4rc1
sagemath-tdlib ~= 10.4rc2
2 changes: 1 addition & 1 deletion pkgs/sage-conf/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
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.4.rc1
10.4.rc2
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.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sage-docbuild/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sage-setup/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sage-sws2rst/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-bliss/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-categories/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-coxeter3/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-environment/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-mcqd/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-meataxe/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-objects/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-repl/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-sirocco/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion pkgs/sagemath-tdlib/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
2 changes: 1 addition & 1 deletion src/VERSION.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
10.4.rc1
10.4.rc2
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.4.rc1'
SAGE_RELEASE_DATE='2024-06-27'
SAGE_VERSION_BANNER='SageMath version 10.4.rc1, Release Date: 2024-06-27'
SAGE_VERSION='10.4.rc2'
SAGE_RELEASE_DATE='2024-07-04'
SAGE_VERSION_BANNER='SageMath version 10.4.rc2, Release Date: 2024-07-04'
8 changes: 0 additions & 8 deletions src/doc/en/developer/packaging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -444,10 +444,6 @@ begin with ``sdh_``, which stands for "Sage-distribution helper".
arguments. If ``$SAGE_DESTDIR`` is not set then the command is run
with ``$SAGE_SUDO``, if set.
- ``sdh_setup_bdist_wheel [...]``: Runs ``setup.py bdist_wheel`` with
the given arguments, as well as additional default arguments used for
installing packages into Sage.
- ``sdh_pip_install [...]``: The equivalent of running ``pip install``
with the given arguments, as well as additional default arguments used for
installing packages into Sage with pip. The last argument must be
Expand Down Expand Up @@ -609,10 +605,6 @@ Where ``sdh_pip_install`` is a function provided by ``sage-dist-helpers`` that
points to the correct ``pip`` for the Python used by Sage, and includes some
default flags needed for correct installation into Sage.
If ``pip`` will not work for a package but a command like ``python3 setup.py install``
will, you may use ``sdh_setup_bdist_wheel``, followed by
``sdh_store_and_pip_install_wheel .``.
For ``spkg-check.in`` script templates, use ``python3`` rather
than just ``python``. The paths are set by the Sage build system
so that this runs the correct version of Python.
Expand Down
2 changes: 1 addition & 1 deletion src/sage/categories/pushout.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ def __mul__(self, other):
"""
if isinstance(other, IdentityConstructionFunctor):
return self
if isinstance(other, self.__class__): #
if isinstance(other, self.__class__):
INT = set(self._gens).intersection(other._gens)
if INT:
# if there is overlap of generators, it must only be at the ends, so that
Expand Down
6 changes: 3 additions & 3 deletions src/sage/combinat/integer_vector_weighted.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ def __contains__(self, x):
if len(self._weights) != len(x):
return False
s = 0
for i, val in enumerate(x):
if (not isinstance(val, (int, Integer))) and (val not in ZZ):
for i, xi in enumerate(x):
if not isinstance(xi, (int, Integer)) and xi not in ZZ:
return False
s += x[i] * self._weights[i]
s += xi * self._weights[i]
return s == self._n

def _recfun(self, n, l):
Expand Down
4 changes: 2 additions & 2 deletions src/sage/geometry/pseudolines.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def __init__(self, seq, encoding="auto"):

i = 0
while crossings > 0:
if (seq[i] != [] and
if (seq[i] and
(seq[i][0] == 0 and
seq[i+1][0] == 1)):

Expand All @@ -290,7 +290,7 @@ def __init__(self, seq, encoding="auto"):
seq[i].pop(0)
seq[i+1].pop(0)

if i > 0 and seq[i-1] is not []:
if i > 0 and seq[i - 1]:
i -= 1
else:
i += 1
Expand Down
12 changes: 6 additions & 6 deletions src/sage/graphs/generators/random.py
Original file line number Diff line number Diff line change
Expand Up @@ -2355,17 +2355,17 @@ def RandomBicubicPlanar(n, seed=None):
Z3 = Zmod(3)
colour = Z3.zero()
not_touched = [i for i, v in enumerate(w) if v[0] in ['x', 'xb']]
for i, v in enumerate(w):
for i, wi in enumerate(w):
# internal edges
if v[0] == 'i':
if wi[0] == 'i':
colour += 1
if w[i + 1][0] == 'n':
G.add_edge((w[i], w[i + 1], colour))
elif v[0] == 'n':
G.add_edge((wi, w[i + 1], colour))
elif wi[0] == 'n':
colour += 2
elif v[0] == 'x':
elif wi[0] == 'x':
pile.append(i)
elif v[0] == 'xb' and i in not_touched:
elif wi[0] == 'xb' and i in not_touched:
if pile:
j = pile.pop()
G.add_edge((w[i + 1], w[j - 1], colour))
Expand Down
Loading

0 comments on commit ed3e1f1

Please sign in to comment.