From 944144be9b249f8219c3665a16e805c952632ac8 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Thu, 4 Apr 2024 23:38:08 -0700 Subject: [PATCH 01/16] build/pkgs/sagemath_*/spkg-check: Replace by spkg-check.in from #35095 --- build/pkgs/sagemath_categories/spkg-check | 1 - build/pkgs/sagemath_categories/spkg-check.in | 1 + build/pkgs/sagemath_environment/spkg-check | 1 - build/pkgs/sagemath_environment/spkg-check.in | 1 + build/pkgs/sagemath_objects/spkg-check | 27 ---------- build/pkgs/sagemath_objects/spkg-check.in | 49 +++++++++++++++++++ build/pkgs/sagemath_repl/spkg-check | 1 - build/pkgs/sagemath_repl/spkg-check.in | 1 + 8 files changed, 52 insertions(+), 30 deletions(-) delete mode 120000 build/pkgs/sagemath_categories/spkg-check create mode 120000 build/pkgs/sagemath_categories/spkg-check.in delete mode 120000 build/pkgs/sagemath_environment/spkg-check create mode 120000 build/pkgs/sagemath_environment/spkg-check.in delete mode 100755 build/pkgs/sagemath_objects/spkg-check create mode 100644 build/pkgs/sagemath_objects/spkg-check.in delete mode 120000 build/pkgs/sagemath_repl/spkg-check create mode 120000 build/pkgs/sagemath_repl/spkg-check.in diff --git a/build/pkgs/sagemath_categories/spkg-check b/build/pkgs/sagemath_categories/spkg-check deleted file mode 120000 index 91c6b1835fc..00000000000 --- a/build/pkgs/sagemath_categories/spkg-check +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_categories/spkg-check.in b/build/pkgs/sagemath_categories/spkg-check.in new file mode 120000 index 00000000000..24eb3322489 --- /dev/null +++ b/build/pkgs/sagemath_categories/spkg-check.in @@ -0,0 +1 @@ +../sagemath_objects/spkg-check.in \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/spkg-check b/build/pkgs/sagemath_environment/spkg-check deleted file mode 120000 index 91c6b1835fc..00000000000 --- a/build/pkgs/sagemath_environment/spkg-check +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/spkg-check.in b/build/pkgs/sagemath_environment/spkg-check.in new file mode 120000 index 00000000000..24eb3322489 --- /dev/null +++ b/build/pkgs/sagemath_environment/spkg-check.in @@ -0,0 +1 @@ +../sagemath_objects/spkg-check.in \ No newline at end of file diff --git a/build/pkgs/sagemath_objects/spkg-check b/build/pkgs/sagemath_objects/spkg-check deleted file mode 100755 index 87cea0fc38f..00000000000 --- a/build/pkgs/sagemath_objects/spkg-check +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash -cd src - -export PIP_NO_INDEX=true -export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS" - -export TOX_PARALLEL_NO_SPINNER=1 -wheel="$(sed -n '1s,.*@ file://,,p' $SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt)" -echo Running "tox -r -p auto -v --installpkg $wheel" -tox -r -p auto -v --installpkg "$wheel" -status=$? -case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in - 0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";; - 0:*:*) echo "Passed the test suite";; - *:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;; - *:warn:*) echo "Warning: Failures testing the package (ignored)"; status=0;; - *:yes:0) echo "New failures, not in baseline known-test-failures*.json";; - *:yes:*) echo "Failures testing the package";; -esac -# Show summaries of failures (suppress lines ending with '[failed in baseline]') -for f in $(pwd)/.tox/sagepython-sagewheels-nopypi-norequirements*/log/*-command*.log; do - if [ -r "$f" ]; then - echo "$f" - grep '^sage -t.*#[^]]*$' "$f" - fi -done -exit $status diff --git a/build/pkgs/sagemath_objects/spkg-check.in b/build/pkgs/sagemath_objects/spkg-check.in new file mode 100644 index 00000000000..9ff603e1b46 --- /dev/null +++ b/build/pkgs/sagemath_objects/spkg-check.in @@ -0,0 +1,49 @@ +cd src + +if [ ! -r tox.ini ]; then + echo "Not testing the package because there is no tox.ini" + exit 0 +fi + +export PIP_NO_INDEX=true +export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS" + +unset tox_args + +wheel="$(sed -n '1s,.*@ file://,,p' $SAGE_SPKG_SCRIPTS/$PKG_BASE/spkg-requirements.txt)" +if [ -n "$wheel" ]; then + tox_envs=$(tox -l) + tox_args="-r -p auto -v --installpkg $wheel" +elif [ "$SAGE_EDITABLE" = yes ]; then + tox_envs=$(tox -l | sed s/norequirements/editable/) + # FIXME: Should use -r if sage_setup or another build requirement changes + tox_args="-r -v -v -v -v -e $(echo $tox_envs | sed 's/ /,/g')" +else + echo "Not testing the package because SAGE_WHEELS=$SAGE_WHEELS and SAGE_EDITABLE=$SAGE_EDITABLE" + exit 0 +fi + +export TOX_PARALLEL_NO_SPINNER=1 + +echo Running "tox $tox_args" +tox $tox_args +status=$? +case $status:$SAGE_CHECK:$([ -r known-test-failures.json ]; echo $?) in + 0:no:*) echo "Not testing the package because SAGE_CHECK=no";; + 0:*:0) echo "Passed the test suite (modulo baseline known-test-failures*.json)";; + 0:*:*) echo "Passed the test suite";; + *:warn:0) echo "Warning: New failures (not in baseline known-test-failures*.json (ignored)"; status=0;; + *:warn:*) echo "Warning: Failures testing the package (ignored)"; status=0;; + *:yes:0) echo "New failures, not in baseline known-test-failures*.json";; + *:yes:*) echo "Failures testing the package";; +esac +# Show summaries of failures (suppress lines ending with '[failed in baseline]') +for e in $tox_envs; do + for f in $(pwd)/.tox/$e/log/*-command*.log; do + if [ -r "$f" ]; then + echo "$f" + grep '^sage -t.*#[^]]*$' "$f" + fi + done +done +exit $status diff --git a/build/pkgs/sagemath_repl/spkg-check b/build/pkgs/sagemath_repl/spkg-check deleted file mode 120000 index 91c6b1835fc..00000000000 --- a/build/pkgs/sagemath_repl/spkg-check +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_repl/spkg-check.in b/build/pkgs/sagemath_repl/spkg-check.in new file mode 120000 index 00000000000..24eb3322489 --- /dev/null +++ b/build/pkgs/sagemath_repl/spkg-check.in @@ -0,0 +1 @@ +../sagemath_objects/spkg-check.in \ No newline at end of file From 2cbf02667e35d2a1c9dc1c4eb40315ea2dd5e592 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 00:00:55 -0700 Subject: [PATCH 02/16] .github/workflows/ci-linux-incremental.yml: Do not run on changes to our script packages --- .github/workflows/ci-linux-incremental.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-linux-incremental.yml b/.github/workflows/ci-linux-incremental.yml index 82b14472c55..4861ef1d1d0 100644 --- a/.github/workflows/ci-linux-incremental.yml +++ b/.github/workflows/ci-linux-incremental.yml @@ -19,7 +19,12 @@ on: pull_request: paths: - 'build/pkgs/**' - - 'pkgs/**' + - '!build/pkgs/sage_conf/**' + - '!build/pkgs/sage_docbuild/**' + - '!build/pkgs/sage_setup/**' + - '!build/pkgs/sage_sws2rst/**' + - '!build/pkgs/sagelib/**' + - '!build/pkgs/sagemath_*/**' workflow_dispatch: concurrency: From 4ee5c250fcc961f6d65d0b91d7233cdf6e01f63f Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 11:29:40 -0700 Subject: [PATCH 03/16] pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: Update from #35095 --- pkgs/sagemath-categories/tox.ini | 27 ++++++++++++++++++++++----- pkgs/sagemath-environment/tox.ini | 16 ++++++++++++++++ pkgs/sagemath-objects/tox.ini | 16 ++++++++++++++++ pkgs/sagemath-repl/tox.ini | 27 ++++++++++++++++++++++----- 4 files changed, 76 insertions(+), 10 deletions(-) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index b4bb49d132a..29b6b15f30b 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -49,6 +49,9 @@ passenv = {[pkgenv]passenv} setenv = {[pkgenv]setenv} # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} + # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL + SAGE_DOC=/doesnotexist + KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json allowlist_externals = bash @@ -61,7 +64,7 @@ commands = {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.categories.all import *; SimplicialComplexes(); FunctionFields()' bash -c 'cd $(python -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") \ - && sage-runtests -p --initial --environment=sage.all__sagemath_categories --probe all --baseline-stats-path={toxinidir}/known-test-failures.json --optional=sage --installed' + && sage-runtests -p --force-lib --initial --environment=sage.all__sagemath_categories --probe all --baseline-stats-path=$KNOWN_TEST_FAILURES --optional=sage --installed' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version @@ -84,6 +87,11 @@ setenv = {[pkgenv]setenv} basepython = {env:SAGE_VENV}/bin/python3 +[testenv:.pkg-sagepython-sagewheels-nopypi-editable] +config_settings_build_editable = + editable_mode = strict + + [testenv:sagepython] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython @@ -92,10 +100,6 @@ package_env = .pkg-sagepython basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython-sagewheels-nopypi -[testenv:sagepython-sagewheels-nopypi-norequirements] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-sagewheels-nopypi - [testenv:sagepython-sagewheels] basepython = {env:SAGE_VENV}/bin/python package_env = .pkg-sagepython @@ -103,3 +107,16 @@ package_env = .pkg-sagepython [testenv:sagepython-norequirements] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython + + +[testenv:sagepython-sagewheels-nopypi-norequirements] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels-nopypi-editable] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi-editable +package = editable +deps = -r requirements-editable.txt +config_settings_build_editable = + editable_mode = strict diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index 6bf1f2a6ebb..96bcbdf4397 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -49,6 +49,9 @@ passenv = {[pkgenv]passenv} setenv = {[pkgenv]setenv} # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} + # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL + SAGE_DOC=/doesnotexist + KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json allowlist_externals = bash @@ -78,6 +81,11 @@ setenv = {[pkgenv]setenv} basepython = {env:SAGE_VENV}/bin/python3 +[testenv:.pkg-sagepython-sagewheels-nopypi-editable] +config_settings_build_editable = + editable_mode = strict + + [testenv:sagepython] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython @@ -98,3 +106,11 @@ package_env = .pkg-sagepython [testenv:sagepython-sagewheels-nopypi-norequirements] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels-nopypi-editable] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi-editable +package = editable +deps = -r requirements-editable.txt +config_settings_build_editable = + editable_mode = strict diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index a8f5a6d6a76..d51d473d84f 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -49,6 +49,9 @@ passenv = {[pkgenv]passenv} setenv = {[pkgenv]setenv} # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} + # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL + SAGE_DOC=/doesnotexist + KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json allowlist_externals = bash @@ -82,6 +85,11 @@ setenv = {[pkgenv]setenv} basepython = {env:SAGE_VENV}/bin/python3 +[testenv:.pkg-sagepython-sagewheels-nopypi-editable] +config_settings_build_editable = + editable_mode = strict + + [testenv:sagepython] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython @@ -102,3 +110,11 @@ package_env = .pkg-sagepython [testenv:sagepython-sagewheels-nopypi-norequirements] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels-nopypi-editable] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi-editable +package = editable +deps = -r requirements-editable.txt +config_settings_build_editable = + editable_mode = strict diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index 679153a2947..ffdf5b97b1c 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -49,6 +49,9 @@ passenv = {[pkgenv]passenv} setenv = {[pkgenv]setenv} # Sage scripts such as sage-runtests like to use $HOME/.sage HOME={envdir} + # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL + SAGE_DOC=/doesnotexist + KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json allowlist_externals = bash @@ -57,7 +60,7 @@ commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.repl.all; import sage.doctest.all' - bash -c 'cd $({envpython} -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path={toxinidir}/known-test-failures.json --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' + bash -c 'cd $({envpython} -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=$KNOWN_TEST_FAILURES --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version @@ -80,6 +83,11 @@ setenv = {[pkgenv]setenv} basepython = {env:SAGE_VENV}/bin/python3 +[testenv:.pkg-sagepython-sagewheels-nopypi-editable] +config_settings_build_editable = + editable_mode = strict + + [testenv:sagepython] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython @@ -88,10 +96,6 @@ package_env = .pkg-sagepython basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython-sagewheels-nopypi -[testenv:sagepython-sagewheels-nopypi-norequirements] -basepython = {env:SAGE_VENV}/bin/python3 -package_env = .pkg-sagepython-sagewheels-nopypi - [testenv:sagepython-sagewheels] basepython = {env:SAGE_VENV}/bin/python package_env = .pkg-sagepython @@ -99,3 +103,16 @@ package_env = .pkg-sagepython [testenv:sagepython-norequirements] basepython = {env:SAGE_VENV}/bin/python3 package_env = .pkg-sagepython + + +[testenv:sagepython-sagewheels-nopypi-norequirements] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi + +[testenv:sagepython-sagewheels-nopypi-editable] +basepython = {env:SAGE_VENV}/bin/python3 +package_env = .pkg-sagepython-sagewheels-nopypi-editable +package = editable +deps = -r requirements-editable.txt +config_settings_build_editable = + editable_mode = strict From 4a8723f4cc66011e0e4c0ee24782f89c88578877 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 11:30:08 -0700 Subject: [PATCH 04/16] pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: Replace use of {envpython} by just python3 --- pkgs/sagemath-categories/tox.ini | 4 ++-- pkgs/sagemath-environment/tox.ini | 2 +- pkgs/sagemath-objects/tox.ini | 4 ++-- pkgs/sagemath-repl/tox.ini | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 29b6b15f30b..3f237f7feef 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -58,10 +58,10 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.cpython.builtin_types, sage.cpython.cython_metaclass, sage.cpython.debug, sage.structure.all, sage.categories.all' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.cpython.builtin_types, sage.cpython.cython_metaclass, sage.cpython.debug, sage.structure.all, sage.categories.all' # Test that importing sage.categories.all initializes categories - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.categories.all import *; SimplicialComplexes(); FunctionFields()' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.categories.all import *; SimplicialComplexes(); FunctionFields()' bash -c 'cd $(python -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") \ && sage-runtests -p --force-lib --initial --environment=sage.all__sagemath_categories --probe all --baseline-stats-path=$KNOWN_TEST_FAILURES --optional=sage --installed' diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index 96bcbdf4397..d3dd3dcaef9 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -58,7 +58,7 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.features.all import all_features; print(sorted(all_features(), key=lambda x: x.name)); import sage.misc.package' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.features.all import all_features; print(sorted(all_features(), key=lambda x: x.name)); import sage.misc.package' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index d51d473d84f..91a0d0bfe62 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -58,9 +58,9 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.structure.all, sage.categories.sets_cat' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.structure.all, sage.categories.sets_cat' - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.all__sagemath_objects import *' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.all__sagemath_objects import *' #bash -c 'cd {temp_dir} && SAGE_SRC=$(python -c "from sage.env import SAGE_SRC; print(SAGE_SRC)") && sage-runtests --environment=sage.all__sagemath_objects --initial --optional=sage $SAGE_SRC/sage/structure || echo "(lots of doctest failures are expected)"' diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index ffdf5b97b1c..9ac2e942948 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -58,9 +58,9 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.repl.all; import sage.doctest.all' + python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.repl.all; import sage.doctest.all' - bash -c 'cd $({envpython} -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=$KNOWN_TEST_FAILURES --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' + bash -c 'cd $(python3 -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=$KNOWN_TEST_FAILURES --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version From 244ceef87b07248655109756bdb8db0cd2a5bdc0 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 19:51:07 -0700 Subject: [PATCH 05/16] build/pkgs/sagemath_{objects,categories,environment,repl}: Back to using spkg-check, source sage-env etc. --- build/pkgs/sagemath_categories/spkg-check | 1 + build/pkgs/sagemath_categories/spkg-check.in | 1 - build/pkgs/sagemath_environment/spkg-check | 1 + build/pkgs/sagemath_environment/spkg-check.in | 1 - .../sagemath_objects/{spkg-check.in => spkg-check} | 10 ++++++++++ build/pkgs/sagemath_repl/spkg-check | 1 + build/pkgs/sagemath_repl/spkg-check.in | 1 - 7 files changed, 13 insertions(+), 3 deletions(-) create mode 120000 build/pkgs/sagemath_categories/spkg-check delete mode 120000 build/pkgs/sagemath_categories/spkg-check.in create mode 120000 build/pkgs/sagemath_environment/spkg-check delete mode 120000 build/pkgs/sagemath_environment/spkg-check.in rename build/pkgs/sagemath_objects/{spkg-check.in => spkg-check} (81%) mode change 100644 => 100755 create mode 120000 build/pkgs/sagemath_repl/spkg-check delete mode 120000 build/pkgs/sagemath_repl/spkg-check.in diff --git a/build/pkgs/sagemath_categories/spkg-check b/build/pkgs/sagemath_categories/spkg-check new file mode 120000 index 00000000000..91c6b1835fc --- /dev/null +++ b/build/pkgs/sagemath_categories/spkg-check @@ -0,0 +1 @@ +../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_categories/spkg-check.in b/build/pkgs/sagemath_categories/spkg-check.in deleted file mode 120000 index 24eb3322489..00000000000 --- a/build/pkgs/sagemath_categories/spkg-check.in +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check.in \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/spkg-check b/build/pkgs/sagemath_environment/spkg-check new file mode 120000 index 00000000000..91c6b1835fc --- /dev/null +++ b/build/pkgs/sagemath_environment/spkg-check @@ -0,0 +1 @@ +../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_environment/spkg-check.in b/build/pkgs/sagemath_environment/spkg-check.in deleted file mode 120000 index 24eb3322489..00000000000 --- a/build/pkgs/sagemath_environment/spkg-check.in +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check.in \ No newline at end of file diff --git a/build/pkgs/sagemath_objects/spkg-check.in b/build/pkgs/sagemath_objects/spkg-check old mode 100644 new mode 100755 similarity index 81% rename from build/pkgs/sagemath_objects/spkg-check.in rename to build/pkgs/sagemath_objects/spkg-check index 9ff603e1b46..99a8528e0da --- a/build/pkgs/sagemath_objects/spkg-check.in +++ b/build/pkgs/sagemath_objects/spkg-check @@ -1,3 +1,4 @@ +#!/usr/bin/env bash cd src if [ ! -r tox.ini ]; then @@ -5,6 +6,15 @@ if [ ! -r tox.ini ]; then exit 0 fi +for lib in "$SAGE_SRC/bin/sage-src-env-config" "$SAGE_SRC/bin/sage-env-config" "$SAGE_SRC/bin/sage-env" "$SAGE_ROOT/build/bin/sage-build-env-config" "$SAGE_ROOT/build/bin/sage-build-env"; do + source "$lib" + if [ $? -ne 0 ]; then + echo >&2 "Error: failed to source $lib" + echo >&2 "Is $SAGE_ROOT the correct SAGE_ROOT?" + exit 1 + fi +done + export PIP_NO_INDEX=true export PIP_FIND_LINKS="file://$SAGE_SPKG_WHEELS" diff --git a/build/pkgs/sagemath_repl/spkg-check b/build/pkgs/sagemath_repl/spkg-check new file mode 120000 index 00000000000..91c6b1835fc --- /dev/null +++ b/build/pkgs/sagemath_repl/spkg-check @@ -0,0 +1 @@ +../sagemath_objects/spkg-check \ No newline at end of file diff --git a/build/pkgs/sagemath_repl/spkg-check.in b/build/pkgs/sagemath_repl/spkg-check.in deleted file mode 120000 index 24eb3322489..00000000000 --- a/build/pkgs/sagemath_repl/spkg-check.in +++ /dev/null @@ -1 +0,0 @@ -../sagemath_objects/spkg-check.in \ No newline at end of file From 1511066b7176930592803fd34cbd8f39ffdc9195 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 20:21:45 -0700 Subject: [PATCH 06/16] CythonFeature: Do not fail on Python 3.12 without setuptools --- src/sage/features/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sage/features/__init__.py b/src/sage/features/__init__.py index a8b11ef7db5..ebeb55527a8 100644 --- a/src/sage/features/__init__.py +++ b/src/sage/features/__init__.py @@ -948,7 +948,10 @@ def _is_present(self): # Available since https://setuptools.pypa.io/en/latest/history.html#v59-0-0 from setuptools.errors import CCompilerError except ImportError: - from distutils.errors import CCompilerError + try: + from distutils.errors import CCompilerError + except ImportError: + CCompilerError = () with open(tmp_filename(ext=".pyx"), 'w') as pyx: pyx.write(self.test_code) try: From 062f2697c15e6aae9941003279cb907cbcb268c2 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 21:24:30 -0700 Subject: [PATCH 07/16] pkgs/sagemath-repl/pyproject.toml.m4: Add dependencies ipykernel, jupyter-client --- pkgs/sagemath-repl/pyproject.toml.m4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/sagemath-repl/pyproject.toml.m4 b/pkgs/sagemath-repl/pyproject.toml.m4 index 2d2f13008be..459a599f1fb 100644 --- a/pkgs/sagemath-repl/pyproject.toml.m4 +++ b/pkgs/sagemath-repl/pyproject.toml.m4 @@ -13,8 +13,10 @@ description = "Sage: Open Source Mathematics Software: IPython kernel, Sage prep dependencies = [ SPKG_INSTALL_REQUIRES_sagemath_objects SPKG_INSTALL_REQUIRES_sagemath_environment + SPKG_INSTALL_REQUIRES_ipykernel SPKG_INSTALL_REQUIRES_ipython SPKG_INSTALL_REQUIRES_ipywidgets + SPKG_INSTALL_REQUIRES_jupyter_client ] dynamic = ["version"] include(`pyproject_toml_metadata.m4')dnl' From 4cc3ccc850f8e588e9333bac3c9c002d6aa71ca1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 21:31:22 -0700 Subject: [PATCH 08/16] pkgs/sagemath-{repl,categories}/tox.ini: Set PYDEVD_DISABLE_FILE_VALIDATION=1 --- pkgs/sagemath-categories/tox.ini | 2 ++ pkgs/sagemath-repl/tox.ini | 2 ++ 2 files changed, 4 insertions(+) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 3f237f7feef..843b0ab242f 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -52,6 +52,8 @@ setenv = {[pkgenv]setenv} # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL SAGE_DOC=/doesnotexist KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json + # See src/bin/sage-env + PYDEVD_DISABLE_FILE_VALIDATION=1 allowlist_externals = bash diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index 9ac2e942948..9386ca22ae9 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -52,6 +52,8 @@ setenv = {[pkgenv]setenv} # Stop 'sage -t --installed' from picking up doc installed in SAGE_LOCAL SAGE_DOC=/doesnotexist KNOWN_TEST_FAILURES={toxinidir}/known-test-failures.json + # See src/bin/sage-env + PYDEVD_DISABLE_FILE_VALIDATION=1 allowlist_externals = bash From ee547fa17f4e76d4e822e50ecd08d3f72b110d53 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 22:55:06 -0700 Subject: [PATCH 09/16] **/tox.ini: Set upper bound tox < 4.14.1 because of https://github.com/tox-dev/tox/issues/3238 --- pkgs/sage-conf_pypi/tox.ini | 4 ++++ pkgs/sage-docbuild/tox.ini | 4 ++++ pkgs/sage-setup/tox.ini | 4 ++++ pkgs/sagemath-categories/tox.ini | 3 ++- pkgs/sagemath-environment/tox.ini | 3 ++- pkgs/sagemath-objects/tox.ini | 3 ++- pkgs/sagemath-repl/tox.ini | 3 ++- pkgs/sagemath-standard/tox.ini | 3 ++- src/tox.ini | 5 +++-- tox.ini | 5 +++-- 10 files changed, 28 insertions(+), 9 deletions(-) diff --git a/pkgs/sage-conf_pypi/tox.ini b/pkgs/sage-conf_pypi/tox.ini index fadf9a9cc6c..7160d4db678 100644 --- a/pkgs/sage-conf_pypi/tox.ini +++ b/pkgs/sage-conf_pypi/tox.ini @@ -1,6 +1,10 @@ [tox] envlist = py39, py310, py311, py39-user, py310-user, py311-user +requires = + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox<4.14.1 + [testenv:.pkg] basepython = py311 passenv = diff --git a/pkgs/sage-docbuild/tox.ini b/pkgs/sage-docbuild/tox.ini index 77da5a78ede..efa222028ff 100644 --- a/pkgs/sage-docbuild/tox.ini +++ b/pkgs/sage-docbuild/tox.ini @@ -8,6 +8,10 @@ # [tox] +requires = + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox<4.14.1 + [testenv] deps = -rrequirements.txt diff --git a/pkgs/sage-setup/tox.ini b/pkgs/sage-setup/tox.ini index fd935f2e978..e8a22f03101 100644 --- a/pkgs/sage-setup/tox.ini +++ b/pkgs/sage-setup/tox.ini @@ -12,6 +12,10 @@ # [tox] +requires = + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox<4.14.1 + [testenv] deps = -rrequirements.txt diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 843b0ab242f..065f0790411 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -13,7 +13,8 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - tox>=4.2 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2,<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index d3dd3dcaef9..7973b0f46a2 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -13,7 +13,8 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - tox>=4.2 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2,<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index 91a0d0bfe62..52c5434e67e 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -13,7 +13,8 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - tox>=4.2 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2,<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index 9386ca22ae9..b65157e4f58 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -13,7 +13,8 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - tox>=4.2 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2,<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-standard/tox.ini b/pkgs/sagemath-standard/tox.ini index 6aae1ef1bfa..c06afe8229d 100644 --- a/pkgs/sagemath-standard/tox.ini +++ b/pkgs/sagemath-standard/tox.ini @@ -62,7 +62,8 @@ envlist = requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance - tox>=4.2 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2,<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/src/tox.ini b/src/tox.ini index aab671441a9..ab7c1b5f18e 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -26,8 +26,9 @@ envlist = doctest, coverage, startuptime, pycodestyle-minimal, relint, codespell skipsdist = true requires = - # For the renamed "allowlist_externals" keyword - tox>=3.18 + # For the renamed "allowlist_externals" keyword, need >= 3.18 + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=3.18,<4.14.1 [sagedirect] # Base for tox environments that bypass the virtual environment set up by tox, diff --git a/tox.ini b/tox.ini index 837764e6441..5167ead23b8 100644 --- a/tox.ini +++ b/tox.ini @@ -129,8 +129,9 @@ envlist = # pycodestyle requires = - # For repaired numerical factors in tox 4: - tox>=4.2.7 + # For repaired numerical factors in tox 4, need >= 4.2.7. + # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 + tox>=4.2.7,<4.14.1 skipsdist = true From 3f87323187132553cd7c158ba2a6ba83a97730b1 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 23:22:32 -0700 Subject: [PATCH 10/16] Revert "pkgs/sagemath-{objects,categories,environment,repl}/tox.ini: Replace use of {envpython} by just python3" This reverts commit cca2b8dd1cdd54f902b85d5adea57e0edbb481bd. --- pkgs/sagemath-categories/tox.ini | 4 ++-- pkgs/sagemath-environment/tox.ini | 2 +- pkgs/sagemath-objects/tox.ini | 4 ++-- pkgs/sagemath-repl/tox.ini | 4 ++-- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 065f0790411..6eaa17fc20e 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -61,10 +61,10 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.cpython.builtin_types, sage.cpython.cython_metaclass, sage.cpython.debug, sage.structure.all, sage.categories.all' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.cpython.builtin_types, sage.cpython.cython_metaclass, sage.cpython.debug, sage.structure.all, sage.categories.all' # Test that importing sage.categories.all initializes categories - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.categories.all import *; SimplicialComplexes(); FunctionFields()' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.categories.all import *; SimplicialComplexes(); FunctionFields()' bash -c 'cd $(python -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") \ && sage-runtests -p --force-lib --initial --environment=sage.all__sagemath_categories --probe all --baseline-stats-path=$KNOWN_TEST_FAILURES --optional=sage --installed' diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index 7973b0f46a2..fec1966d9a9 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -59,7 +59,7 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.features.all import all_features; print(sorted(all_features(), key=lambda x: x.name)); import sage.misc.package' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.features.all import all_features; print(sorted(all_features(), key=lambda x: x.name)); import sage.misc.package' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index 52c5434e67e..3e539e2e3b0 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -59,9 +59,9 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.structure.all, sage.categories.sets_cat' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.structure.all, sage.categories.sets_cat' - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.all__sagemath_objects import *' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); from sage.all__sagemath_objects import *' #bash -c 'cd {temp_dir} && SAGE_SRC=$(python -c "from sage.env import SAGE_SRC; print(SAGE_SRC)") && sage-runtests --environment=sage.all__sagemath_objects --initial --optional=sage $SAGE_SRC/sage/structure || echo "(lots of doctest failures are expected)"' diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index b65157e4f58..d565aa7b2a4 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -61,9 +61,9 @@ allowlist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python3 -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.repl.all; import sage.doctest.all' + {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.repl.all; import sage.doctest.all' - bash -c 'cd $(python3 -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=$KNOWN_TEST_FAILURES --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' + bash -c 'cd $({envpython} -c "import sys; \"\" in sys.path and sys.path.remove(\"\"); from sage.env import SAGE_LIB; print(SAGE_LIB)") && sage-runtests -p --environment=sage.all__sagemath_repl --baseline-stats-path=$KNOWN_TEST_FAILURES --initial --optional=sage sage/repl sage/doctest sage/misc/sage_input.py sage/misc/sage_eval.py' [testenv:.tox] # Allow access to PyPI for auto-provisioning a suitable tox version From 388dd3bf532c737871a8dc3e984c5e347bac08ca Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 23:25:45 -0700 Subject: [PATCH 11/16] pkgs/sagemath-{repl,categories,environment,objects}/requirements-editable.txt.m4: Copy from #35095 --- pkgs/sagemath-categories/requirements-editable.txt.m4 | 7 +++++++ .../sagemath-environment/requirements-editable.txt.m4 | 0 pkgs/sagemath-objects/requirements-editable.txt.m4 | 4 ++++ pkgs/sagemath-repl/requirements-editable.txt.m4 | 11 +++++++++++ 4 files changed, 22 insertions(+) create mode 100644 pkgs/sagemath-categories/requirements-editable.txt.m4 create mode 100644 pkgs/sagemath-environment/requirements-editable.txt.m4 create mode 100644 pkgs/sagemath-objects/requirements-editable.txt.m4 create mode 100644 pkgs/sagemath-repl/requirements-editable.txt.m4 diff --git a/pkgs/sagemath-categories/requirements-editable.txt.m4 b/pkgs/sagemath-categories/requirements-editable.txt.m4 new file mode 100644 index 00000000000..1c0abbe40ae --- /dev/null +++ b/pkgs/sagemath-categories/requirements-editable.txt.m4 @@ -0,0 +1,7 @@ +include(`sage_spkg_versions.m4')dnl +dnl Same as setup.cfg.m4 install_requires; FIXME: should pin to built wheels. +SPKG_INSTALL_REQUIRES_gmpy2 +SPKG_INSTALL_REQUIRES_cysignals +SPKG_INSTALL_REQUIRES_memory_allocator +-e ../sagemath-environment +-e ../sagemath-objects diff --git a/pkgs/sagemath-environment/requirements-editable.txt.m4 b/pkgs/sagemath-environment/requirements-editable.txt.m4 new file mode 100644 index 00000000000..e69de29bb2d diff --git a/pkgs/sagemath-objects/requirements-editable.txt.m4 b/pkgs/sagemath-objects/requirements-editable.txt.m4 new file mode 100644 index 00000000000..df9b22b43aa --- /dev/null +++ b/pkgs/sagemath-objects/requirements-editable.txt.m4 @@ -0,0 +1,4 @@ +include(`sage_spkg_versions.m4')dnl +dnl Same as setup.cfg.m4 install_requires; FIXME: should pin to built wheels. +SPKG_INSTALL_REQUIRES_gmpy2 +SPKG_INSTALL_REQUIRES_cysignals diff --git a/pkgs/sagemath-repl/requirements-editable.txt.m4 b/pkgs/sagemath-repl/requirements-editable.txt.m4 new file mode 100644 index 00000000000..fa89ade7621 --- /dev/null +++ b/pkgs/sagemath-repl/requirements-editable.txt.m4 @@ -0,0 +1,11 @@ +include(`sage_spkg_versions.m4')dnl +dnl Same as setup.cfg.m4 install_requires (+ their install-requires) +dnl FIXME: should pin to built wheels. +SPKG_INSTALL_REQUIRES_gmpy2 +SPKG_INSTALL_REQUIRES_cysignals +SPKG_INSTALL_REQUIRES_memory_allocator +SPKG_INSTALL_REQUIRES_ipython +SPKG_INSTALL_REQUIRES_ipywidgets +dnl To be added when ready for editable: +-e ../sagemath-environment +-e ../sagemath-objects From 7e6017c215696b3806b87e230900089a3280e889 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Fri, 5 Apr 2024 23:32:52 -0700 Subject: [PATCH 12/16] **/tox.ini: Set upper bound tox < 4.14.1 because of https://github.com/tox-dev/tox/issues/3238 (fixup) --- pkgs/sagemath-categories/tox.ini | 2 +- pkgs/sagemath-environment/tox.ini | 2 +- pkgs/sagemath-objects/tox.ini | 2 +- pkgs/sagemath-repl/tox.ini | 2 +- pkgs/sagemath-standard/tox.ini | 2 +- src/tox.ini | 2 +- tox.ini | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 6eaa17fc20e..2dff44b2f8d 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -14,7 +14,7 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2,<4.14.1 + tox>=4.2, tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index fec1966d9a9..502f6967798 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -14,7 +14,7 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2,<4.14.1 + tox>=4.2, tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index 3e539e2e3b0..24e7a2f107d 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -14,7 +14,7 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2,<4.14.1 + tox>=4.2, tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index d565aa7b2a4..f0874d4e22b 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -14,7 +14,7 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2,<4.14.1 + tox>=4.2, tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-standard/tox.ini b/pkgs/sagemath-standard/tox.ini index c06afe8229d..6e38a8e0f23 100644 --- a/pkgs/sagemath-standard/tox.ini +++ b/pkgs/sagemath-standard/tox.ini @@ -63,7 +63,7 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2,<4.14.1 + tox>=4.2, tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/src/tox.ini b/src/tox.ini index ab7c1b5f18e..31ae15a8946 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -28,7 +28,7 @@ skipsdist = true requires = # For the renamed "allowlist_externals" keyword, need >= 3.18 # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=3.18,<4.14.1 + tox>=3.18, tox<4.14.1 [sagedirect] # Base for tox environments that bypass the virtual environment set up by tox, diff --git a/tox.ini b/tox.ini index 5167ead23b8..1ecfc8efd1b 100644 --- a/tox.ini +++ b/tox.ini @@ -131,7 +131,7 @@ envlist = requires = # For repaired numerical factors in tox 4, need >= 4.2.7. # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2.7,<4.14.1 + tox>=4.2.7, tox<4.14.1 skipsdist = true From be01f005b19852fb7491c0948727b22d8181f964 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 6 Apr 2024 00:02:59 -0700 Subject: [PATCH 13/16] tox.ini: Fix 'requires' for autoprovisioning on tox 3 --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 1ecfc8efd1b..1ed1352e187 100644 --- a/tox.ini +++ b/tox.ini @@ -131,7 +131,8 @@ envlist = requires = # For repaired numerical factors in tox 4, need >= 4.2.7. # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2.7, tox<4.14.1 + tox>=4.2.7 + tox<4.14.1 skipsdist = true From ae347070a8cdd77759e7515d2e104c16a94d886d Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sat, 13 Apr 2024 13:16:57 -0700 Subject: [PATCH 14/16] src/sage/doctest/reporting.py: Add missing # needs SAGE_SRC --- src/sage/doctest/reporting.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sage/doctest/reporting.py b/src/sage/doctest/reporting.py index 600a18b0e8d..74b823becc2 100644 --- a/src/sage/doctest/reporting.py +++ b/src/sage/doctest/reporting.py @@ -145,7 +145,8 @@ def were_doctests_with_optional_tag_run(self, tag): When latex is available, doctests marked with optional tag ``latex`` are run by default since :issue:`32174`:: - sage: filename = os.path.join(SAGE_SRC,'sage','misc','latex.py') + sage: # needs SAGE_SRC + sage: filename = os.path.join(SAGE_SRC, 'sage', 'misc', 'latex.py') sage: DC = DocTestController(DocTestDefaults(), [filename]) sage: DTR = DocTestReporter(DC) sage: DTR.were_doctests_with_optional_tag_run('latex') # optional - latex From aba5aec3d32a3e72271f7d0aa9396aaa10e8287a Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 14 Apr 2024 22:50:35 -0700 Subject: [PATCH 15/16] **/tox.ini: Fix format of [tox] requires --- pkgs/sagemath-categories/tox.ini | 3 ++- pkgs/sagemath-environment/tox.ini | 3 ++- pkgs/sagemath-objects/tox.ini | 3 ++- pkgs/sagemath-repl/tox.ini | 3 ++- pkgs/sagemath-standard/tox.ini | 3 ++- src/tox.ini | 3 ++- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/pkgs/sagemath-categories/tox.ini b/pkgs/sagemath-categories/tox.ini index 2dff44b2f8d..841209e88f1 100644 --- a/pkgs/sagemath-categories/tox.ini +++ b/pkgs/sagemath-categories/tox.ini @@ -14,7 +14,8 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2, tox<4.14.1 + tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index 502f6967798..5d741bd0b48 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -14,7 +14,8 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2, tox<4.14.1 + tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-objects/tox.ini b/pkgs/sagemath-objects/tox.ini index 24e7a2f107d..a7b91f55990 100644 --- a/pkgs/sagemath-objects/tox.ini +++ b/pkgs/sagemath-objects/tox.ini @@ -14,7 +14,8 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2, tox<4.14.1 + tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index f0874d4e22b..d7b557761ac 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -14,7 +14,8 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2, tox<4.14.1 + tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/pkgs/sagemath-standard/tox.ini b/pkgs/sagemath-standard/tox.ini index 6e38a8e0f23..c197f49d9be 100644 --- a/pkgs/sagemath-standard/tox.ini +++ b/pkgs/sagemath-standard/tox.ini @@ -63,7 +63,8 @@ requires = # Auto-provision a modern tox. # [pkgenv] added in 4.2 - https://tox.wiki/en/latest/upgrading.html#packaging-configuration-and-inheritance # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=4.2, tox<4.14.1 + tox>=4.2 + tox<4.14.1 [pkgenv] # Environment in which to build the sdist. diff --git a/src/tox.ini b/src/tox.ini index 31ae15a8946..57a7a11aaa9 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -28,7 +28,8 @@ skipsdist = true requires = # For the renamed "allowlist_externals" keyword, need >= 3.18 # Because of https://github.com/tox-dev/tox/issues/3238, need <4.14.1 - tox>=3.18, tox<4.14.1 + tox>=3.18 + tox<4.14.1 [sagedirect] # Base for tox environments that bypass the virtual environment set up by tox, From 6d704b00c721bf702dbb6232ad54214d70d4e2c7 Mon Sep 17 00:00:00 2001 From: Matthias Koeppe Date: Sun, 28 Apr 2024 10:04:16 -0700 Subject: [PATCH 16/16] sage -fixdoctests --distribution sagemath-categories --update-known-test-failures --- .../known-test-failures.json | 110 ++++++++++-------- 1 file changed, 60 insertions(+), 50 deletions(-) diff --git a/pkgs/sagemath-categories/known-test-failures.json b/pkgs/sagemath-categories/known-test-failures.json index ddae185a7d9..ab27f65ca8d 100644 --- a/pkgs/sagemath-categories/known-test-failures.json +++ b/pkgs/sagemath-categories/known-test-failures.json @@ -26,7 +26,7 @@ "ntests": 28 }, "sage.categories.affine_weyl_groups": { - "ntests": 14 + "ntests": 15 }, "sage.categories.algebra_ideals": { "failed": true, @@ -38,7 +38,7 @@ }, "sage.categories.algebras": { "failed": true, - "ntests": 20 + "ntests": 25 }, "sage.categories.algebras_with_basis": { "failed": true, @@ -126,7 +126,7 @@ }, "sage.categories.commutative_rings": { "failed": true, - "ntests": 39 + "ntests": 41 }, "sage.categories.complete_discrete_valuation": { "failed": true, @@ -148,15 +148,19 @@ }, "sage.categories.coxeter_groups": { "failed": true, - "ntests": 362 + "ntests": 392 }, "sage.categories.cw_complexes": { "failed": true, "ntests": 36 }, + "sage.categories.dedekind_domains": { + "failed": true, + "ntests": 30 + }, "sage.categories.discrete_valuation": { "failed": true, - "ntests": 23 + "ntests": 28 }, "sage.categories.distributive_magmas_and_additive_magmas": { "failed": true, @@ -169,9 +173,6 @@ "failed": true, "ntests": 7 }, - "sage.categories.drinfeld_modules": { - "ntests": 2 - }, "sage.categories.dual": { "failed": true, "ntests": 1 @@ -297,18 +298,18 @@ }, "sage.categories.filtered_modules_with_basis": { "failed": true, - "ntests": 65 + "ntests": 74 }, "sage.categories.finite_complex_reflection_groups": { "failed": true, - "ntests": 178 + "ntests": 189 }, "sage.categories.finite_coxeter_groups": { "ntests": 6 }, "sage.categories.finite_dimensional_algebras_with_basis": { "failed": true, - "ntests": 87 + "ntests": 91 }, "sage.categories.finite_dimensional_bialgebras_with_basis": { "failed": true, @@ -328,11 +329,11 @@ }, "sage.categories.finite_dimensional_lie_algebras_with_basis": { "failed": true, - "ntests": 34 + "ntests": 73 }, "sage.categories.finite_dimensional_modules_with_basis": { "failed": true, - "ntests": 55 + "ntests": 89 }, "sage.categories.finite_dimensional_nilpotent_lie_algebras_with_basis": { "failed": true, @@ -493,10 +494,6 @@ "failed": true, "ntests": 13 }, - "sage.categories.inner_product_spaces": { - "failed": true, - "ntests": 9 - }, "sage.categories.integral_domains": { "failed": true, "ntests": 22 @@ -530,7 +527,7 @@ }, "sage.categories.lie_algebras": { "failed": true, - "ntests": 125 + "ntests": 135 }, "sage.categories.lie_algebras_with_basis": { "ntests": 19 @@ -586,7 +583,7 @@ }, "sage.categories.modules_with_basis": { "failed": true, - "ntests": 221 + "ntests": 240 }, "sage.categories.monoid_algebras": { "failed": true, @@ -598,7 +595,7 @@ }, "sage.categories.morphism": { "failed": true, - "ntests": 99 + "ntests": 126 }, "sage.categories.number_fields": { "failed": true, @@ -668,14 +665,14 @@ }, "sage.categories.rings": { "failed": true, - "ntests": 141 + "ntests": 146 }, "sage.categories.rngs": { "ntests": 6 }, "sage.categories.schemes": { "failed": true, - "ntests": 23 + "ntests": 41 }, "sage.categories.semigroups": { "failed": true, @@ -711,7 +708,7 @@ }, "sage.categories.simplicial_sets": { "failed": true, - "ntests": 57 + "ntests": 98 }, "sage.categories.subobjects": { "ntests": 2 @@ -765,7 +762,7 @@ }, "sage.categories.unital_algebras": { "failed": true, - "ntests": 39 + "ntests": 37 }, "sage.categories.vector_spaces": { "failed": true, @@ -783,7 +780,7 @@ }, "sage.cpython.debug": { "failed": true, - "ntests": 14 + "ntests": 13 }, "sage.cpython.dict_del_by_value": { "failed": true, @@ -808,30 +805,28 @@ }, "sage.doctest.control": { "failed": true, - "ntests": 0 + "ntests": 230 }, "sage.doctest.external": { "ntests": 42 }, "sage.doctest.fixtures": { - "failed": true, "ntests": 59 }, "sage.doctest.forker": { "failed": true, - "ntests": 433 + "ntests": 413 }, "sage.doctest.parsing": { "failed": true, - "ntests": 321 + "ntests": 313 }, "sage.doctest.reporting": { - "failed": true, - "ntests": 124 + "ntests": 115 }, "sage.doctest.sources": { "failed": true, - "ntests": 378 + "ntests": 343 }, "sage.doctest.test": { "failed": true, @@ -846,7 +841,7 @@ "ntests": 41 }, "sage.features": { - "ntests": 145 + "ntests": 143 }, "sage.features.all": { "ntests": 14 @@ -865,17 +860,23 @@ }, "sage.features.databases": { "failed": true, - "ntests": 26 + "ntests": 38 }, "sage.features.dvipng": { "ntests": 4 }, + "sage.features.ecm": { + "ntests": 4 + }, "sage.features.ffmpeg": { "ntests": 4 }, "sage.features.four_ti_2": { "ntests": 6 }, + "sage.features.fricas": { + "ntests": 6 + }, "sage.features.gap": { "ntests": 6 }, @@ -901,7 +902,11 @@ "sage.features.internet": { "ntests": 5 }, + "sage.features.jmol": { + "ntests": 4 + }, "sage.features.join_feature": { + "failed": true, "ntests": 25 }, "sage.features.kenzo": { @@ -960,7 +965,7 @@ }, "sage.features.sagemath": { "failed": true, - "ntests": 147 + "ntests": 151 }, "sage.features.singular": { "ntests": 4 @@ -968,9 +973,16 @@ "sage.features.sphinx": { "ntests": 4 }, + "sage.features.symengine_py": { + "ntests": 4 + }, "sage.features.tdlib": { "ntests": 2 }, + "sage.features.threejs": { + "failed": true, + "ntests": 6 + }, "sage.misc.abstract_method": { "failed": true, "ntests": 33 @@ -1001,7 +1013,7 @@ }, "sage.misc.decorators": { "failed": true, - "ntests": 126 + "ntests": 125 }, "sage.misc.fast_methods": { "failed": true, @@ -1059,7 +1071,7 @@ }, "sage.misc.package_dir": { "failed": true, - "ntests": 29 + "ntests": 35 }, "sage.misc.persist": { "failed": true, @@ -1091,7 +1103,7 @@ }, "sage.misc.sageinspect": { "failed": true, - "ntests": 329 + "ntests": 322 }, "sage.misc.superseded": { "failed": true, @@ -1157,7 +1169,7 @@ }, "sage.repl.interpreter": { "failed": true, - "ntests": 118 + "ntests": 114 }, "sage.repl.ipython_extension": { "failed": true, @@ -1165,13 +1177,14 @@ }, "sage.repl.ipython_kernel.install": { "failed": true, - "ntests": 40 + "ntests": 35 }, "sage.repl.ipython_kernel.interact": { "failed": true, "ntests": 42 }, "sage.repl.ipython_kernel.kernel": { + "failed": true, "ntests": 12 }, "sage.repl.ipython_kernel.widgets": { @@ -1188,7 +1201,7 @@ }, "sage.repl.load": { "failed": true, - "ntests": 42 + "ntests": 38 }, "sage.repl.preparse": { "failed": true, @@ -1206,7 +1219,7 @@ }, "sage.repl.rich_output.backend_ipython": { "failed": true, - "ntests": 78 + "ntests": 75 }, "sage.repl.rich_output.buffer": { "failed": true, @@ -1214,7 +1227,7 @@ }, "sage.repl.rich_output.display_manager": { "failed": true, - "ntests": 88 + "ntests": 86 }, "sage.repl.rich_output.output_basic": { "ntests": 47 @@ -1251,7 +1264,7 @@ }, "sage.rings.ring": { "failed": true, - "ntests": 337 + "ntests": 298 }, "sage.sets.pythonclass": { "failed": true, @@ -1263,7 +1276,7 @@ }, "sage.structure.coerce": { "failed": true, - "ntests": 314 + "ntests": 310 }, "sage.structure.coerce_actions": { "failed": true, @@ -1298,7 +1311,7 @@ }, "sage.structure.factorization": { "failed": true, - "ntests": 203 + "ntests": 200 }, "sage.structure.factorization_integer": { "failed": true, @@ -1315,9 +1328,6 @@ "sage.structure.global_options": { "ntests": 145 }, - "sage.structure.graphics_file": { - "ntests": 8 - }, "sage.structure.indexed_generators": { "failed": true, "ntests": 90 @@ -1345,7 +1355,7 @@ }, "sage.structure.parent": { "failed": true, - "ntests": 300 + "ntests": 303 }, "sage.structure.parent_gens": { "failed": true,