diff --git a/pkgs/sagemath-environment/tox.ini b/pkgs/sagemath-environment/tox.ini index 8af948f4676..7f08078d74e 100644 --- a/pkgs/sagemath-environment/tox.ini +++ b/pkgs/sagemath-environment/tox.ini @@ -1,16 +1,20 @@ # To build and test in the tox environment: # -# ./sage -sh -c '(cd pkgs/sagemath-environment && tox -v -v)' +# ./sage -sh -c '(cd pkgs/sagemath-environment && tox -v -v -e sagepython)' # # To test interactively: # -# pkgs/sagemath-environment/.tox/python/bin/python +# pkgs/sagemath-environment/.tox/sagepython/bin/python # [tox] +envlist = + sagepython-norequirements + isolated_build = True [testenv] -deps = -rrequirements.txt +deps = + !norequirements: -rrequirements.txt setenv = # Sage scripts such as sage-runtests like to use $HOME/.sage @@ -25,7 +29,7 @@ whitelist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python -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:sagepython] passenv = diff --git a/pkgs/sagemath-repl/tox.ini b/pkgs/sagemath-repl/tox.ini index ff2e8e826f1..d766fa55f74 100644 --- a/pkgs/sagemath-repl/tox.ini +++ b/pkgs/sagemath-repl/tox.ini @@ -1,16 +1,20 @@ # To build and test in the tox environment: # -# ./sage -sh -c '(cd pkgs/sagemath-repl && tox -v -v)' +# ./sage -sh -c '(cd pkgs/sagemath-repl && tox -v -v -e sagepython)' # # To test interactively: # -# pkgs/sagemath-repl/.tox/python/bin/python +# pkgs/sagemath-repl/.tox/sagepython/bin/python # [tox] +envlist = + sagepython-norequirements + isolated_build = True [testenv] -deps = -rrequirements.txt +deps = + !norequirements: -rrequirements.txt setenv = # Sage scripts such as sage-runtests like to use $HOME/.sage @@ -25,9 +29,9 @@ whitelist_externals = commands = # Beware of the treacherous non-src layout. "./sage/" shadows the installed sage package. - python -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 bin && SAGE_SRC=$(python -c "from sage.env import SAGE_SRC; print(SAGE_SRC)") && sage-runtests --environment=sage.all__sagemath_repl --optional=sage $SAGE_SRC/sage/repl $SAGE_SRC/sage/doctest $SAGE_SRC/sage/misc/sage_input.py $SAGE_SRC/sage/misc/sage_eval.py || echo "(lots of doctest failures are expected)"' + bash -c 'cd bin && SAGE_SRC=$({envpython} -c "from sage.env import SAGE_SRC; print(SAGE_SRC)") && sage-runtests --environment=sage.all__sagemath_repl --optional=sage $SAGE_SRC/sage/repl $SAGE_SRC/sage/doctest $SAGE_SRC/sage/misc/sage_input.py $SAGE_SRC/sage/misc/sage_eval.py || echo "(lots of doctest failures are expected)"' [testenv:sagepython] passenv =