Skip to content
This repository was archived by the owner on Jan 30, 2023. It is now read-only.

Commit 2a30209

Browse files
committed
Add tox env with editable installs
1 parent d6d0edc commit 2a30209

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

src/tox.ini

+16-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
## in a virtual environment.
2222
##
2323
[tox]
24-
envlist = doctest, coverage, startuptime, pycodestyle-minimal, relint, codespell
24+
envlist = py{38,39}, doctest, coverage, startuptime, pycodestyle-minimal, relint, codespell
2525
# When adding environments above, also update the delegations in SAGE_ROOT/tox.ini
2626
skipsdist = true
2727

@@ -34,6 +34,21 @@ setenv =
3434
SAGE={toxinidir}/../sage
3535
envdir={toxworkdir}/sagedirect
3636

37+
[testenv]
38+
# Use editable install of main sagemath package
39+
usedevelop=True
40+
# Use bash hack as long as tox doesn't support multiple install commands: https://github.com/tox-dev/tox/issues/715
41+
allowlist_externals=bash
42+
install_command = bash -c '. {toxinidir}/bin/sage-env-config && . {toxinidir}/bin/sage-env && python -m pip install --editable=file:///{toxinidir}/../pkgs/sage-conf && python -m pip install --find-links "$SAGE_SPKG_WHEELS" "$@"' bash {opts} {packages}
43+
deps = -rrequirements.txt
44+
passenv =
45+
HOME
46+
setenv =
47+
SAGE_NUM_THREADS=12
48+
SAGE_SPKG_WHEELS={toxinidir}/../local/var/lib/sage/venv-python3.8/var/lib/sage/wheels
49+
commands =
50+
python bin/sage-runtests {posargs:--all}
51+
3752
[testenv:doctest]
3853
description =
3954
run the Sage doctester (same as "sage -t")

0 commit comments

Comments
 (0)