Skip to content

Commit 516798a

Browse files

File tree

11 files changed

+35
-17
lines changed

11 files changed

+35
-17
lines changed
 

‎build/pkgs/tox/spkg-configure.m4

+16-5
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
SAGE_SPKG_CONFIGURE([tox], [
22
dnl Use non-ancient tox with full support for PEP 517.
3-
m4_pushdef([TOX_MIN_VERSION], [3.21.4])
4-
AC_CACHE_CHECK([for tox >= ]TOX_MIN_VERSION, [ac_cv_path_TOX], [
3+
m4_pushdef([TOX3_MIN_VERSION], [3.21.4])
4+
dnl Early 4.0.x versions have bugs regarding complex factor conditions
5+
m4_pushdef([TOX4_MIN_VERSION], [4.0.15])
6+
AC_CACHE_CHECK([for tox 3 >= ]TOX3_MIN_VERSION[ or tox 4 >= ]TOX4_MIN_VERSION, [ac_cv_path_TOX], [
57
AC_PATH_PROGS_FEATURE_CHECK([TOX], [tox], [
68
tox_version=$($ac_path_TOX --version 2> /dev/null | tail -1)
79
AS_IF([test -n "$tox_version"], [
8-
AX_COMPARE_VERSION([$tox_version], [ge], TOX_MIN_VERSION, [
9-
ac_cv_path_TOX="$ac_path_TOX"
10-
ac_path_TOX_found=:
10+
AX_COMPARE_VERSION([$tox_version], [lt], [4], [
11+
AX_COMPARE_VERSION([$tox_version], [ge], TOX3_MIN_VERSION, [
12+
ac_cv_path_TOX="$ac_path_TOX"
13+
ac_path_TOX_found=:
14+
])
15+
], [
16+
AX_COMPARE_VERSION([$tox_version], [ge], TOX4_MIN_VERSION, [
17+
ac_cv_path_TOX="$ac_path_TOX"
18+
ac_path_TOX_found=:
19+
])
1120
])
1221
])
1322
])
1423
])
1524
AS_IF([test -z "$ac_cv_path_TOX"],
1625
[sage_spkg_install_tox=yes])
26+
m4_popdef([TOX4_MIN_VERSION])
27+
m4_popdef([TOX3_MIN_VERSION])
1728
])

‎pkgs/sage-docbuild/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ setenv =
1515
# Sage scripts like to use $HOME/.sage
1616
HOME={envdir}
1717

18-
whitelist_externals =
18+
allowlist_externals =
1919
bash
2020

2121
commands =

‎pkgs/sage-setup/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ setenv =
1919
# Sage scripts such as sage-runtests like to use $HOME/.sage
2020
HOME={envdir}
2121

22-
whitelist_externals =
22+
allowlist_externals =
2323
bash
2424

2525
commands =

‎pkgs/sage-sws2rst/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
[testenv]
1212
deps = -rrequirements.txt
1313

14-
whitelist_externals =
14+
allowlist_externals =
1515
./check.sh
1616

1717
commands =

‎pkgs/sagemath-categories/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ setenv =
3939
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
4040
nopypi: PIP_NO_INDEX=true
4141

42-
whitelist_externals =
42+
allowlist_externals =
4343
bash
4444

4545
commands =

‎pkgs/sagemath-environment/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ setenv =
3333
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
3434
nopypi: PIP_NO_INDEX=true
3535

36-
whitelist_externals =
36+
allowlist_externals =
3737
bash
3838

3939
commands =

‎pkgs/sagemath-objects/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ setenv =
3737
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
3838
nopypi: PIP_NO_INDEX=true
3939

40-
whitelist_externals =
40+
allowlist_externals =
4141
bash
4242

4343
commands =

‎pkgs/sagemath-repl/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ setenv =
3737
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
3838
nopypi: PIP_NO_INDEX=true
3939

40-
whitelist_externals =
40+
allowlist_externals =
4141
bash
4242

4343
commands =

‎pkgs/sagemath-standard/tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ sitepackages =
107107
sitepackages: True
108108
!sitepackages: False
109109

110-
whitelist_externals =
110+
allowlist_externals =
111111
bash
112112

113113
skip_install =

‎src/tox.ini

+9-2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ passenv =
3737
setenv =
3838
SAGE={toxinidir}/../sage
3939
envdir={toxworkdir}/sagedirect
40+
allowlist_externals =
41+
{env:SAGE}
4042

4143
[testenv:doctest]
4244
description =
@@ -45,6 +47,7 @@ description =
4547
passenv = {[sagedirect]passenv}
4648
setenv = {[sagedirect]setenv}
4749
envdir = {[sagedirect]envdir}
50+
allowlist_externals = {[sagedirect]allowlist_externals}
4851
commands =
4952
{env:SAGE} -t -p 0 {posargs:--all}
5053

@@ -56,6 +59,7 @@ description =
5659
passenv = {[sagedirect]passenv}
5760
setenv = {[sagedirect]setenv}
5861
envdir = {[sagedirect]envdir}
62+
allowlist_externals = {[sagedirect]allowlist_externals}
5963
commands =
6064
{env:SAGE} --coverage {posargs:--all}
6165

@@ -67,6 +71,7 @@ description =
6771
passenv = {[sagedirect]passenv}
6872
setenv = {[sagedirect]setenv}
6973
envdir = {[sagedirect]envdir}
74+
allowlist_externals = {[sagedirect]allowlist_externals}
7075
commands =
7176
{env:SAGE} --startuptime {posargs}
7277

@@ -75,17 +80,19 @@ description =
7580
run the static typing checker pyright
7681
deps = pyright
7782
setenv =
83+
{[sagedirect]setenv}
7884
HOME={envdir}
7985
# Fix version, see .github/workflows/build.yml
8086
PYRIGHT_PYTHON_FORCE_VERSION=1.1.232
87+
allowlist_externals = {[sagedirect]allowlist_externals}
8188
## We run pyright from within the sage-env so that SAGE_LOCAL is available.
8289
## pyright is already configured via SAGE_ROOT/pyrightconfig.json to use our venv.
8390
##
8491
## Running pyright on the whole Sage source tree takes very long
8592
## and may run out of memory. When no files/directories are given, just run it
8693
## on the packages that already have typing annotations.
8794
commands =
88-
{toxinidir}/../sage -sh -c 'pyright {posargs:{toxinidir}/sage/combinat {toxinidir}/sage/manifolds}'
95+
{env:SAGE} -sh -c 'pyright {posargs:{toxinidir}/sage/combinat {toxinidir}/sage/manifolds}'
8996

9097
[testenv:pycodestyle]
9198
description =
@@ -168,7 +175,7 @@ description =
168175
# https://pypi.org/project/codespell/
169176
deps = codespell
170177
commands = codespell \
171-
--skip="*#*,*.a,*.bak,*.bz2,*.dia,*.gz,*.ico,*.inv,*.JPEG,*.jpeg" \
178+
--skip="*\#*,*.a,*.bak,*.bz2,*.dia,*.gz,*.ico,*.inv,*.JPEG,*.jpeg" \
172179
--skip="*.JPG,*.jpg,*.log,*.o,*.orig,*.PDF,*.pdf,*.PNG,*.png,*.pyc" \
173180
--skip="*.so,*.sobj,*.sws,*.tar,*.tgz,*.xz,*.zip,*~*,.DS_Store" \
174181
--skip="doc/ca,doc/de,doc/es,doc/fr,doc/hu,doc/it,doc/ja,doc/pt,doc/ru,doc/tr" \

‎tox.ini

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,8 @@ envlist =
129129
# pycodestyle
130130

131131
requires =
132-
# For the renamed "allowlist_externals" keyword
133-
tox>=3.18
132+
# For repaired numerical factors in tox 4:
133+
tox>=4.2.7
134134

135135
skipsdist = true
136136

0 commit comments

Comments
 (0)
Please sign in to comment.