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

Commit

Permalink
pkgs/sagemath-*/tox.ini: Add sagepython-norequirements-sagewheels-nopypi
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthias Koeppe committed May 8, 2022
1 parent bbd9f05 commit f6a2ee2
Show file tree
Hide file tree
Showing 4 changed files with 72 additions and 15 deletions.
2 changes: 2 additions & 0 deletions pkgs/sagemath-categories/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ envlist =
[testenv]
deps =
!norequirements: -rrequirements.txt
# tox 3.x does not handle extras when using --installpkg. https://github.com/tox-dev/tox/issues/1576
sagemath-repl

extras = test

Expand Down
34 changes: 27 additions & 7 deletions pkgs/sagemath-environment/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,42 @@
# pkgs/sagemath-environment/.tox/python/bin/python
#
[tox]
isolated_build = True
envlist =
sagepython-norequirements

[testenv]
deps = -rrequirements.txt
deps =
!norequirements: -rrequirements.txt

passenv =
# Variables set by .homebrew-build-env
CPATH
LIBRARY_PATH
PKG_CONFIG_PATH
# Parallel build
SAGE_NUM_THREADS
# SAGE_VENV only for finding the wheels
sagewheels: SAGE_VENV
# Location of the wheels
sagewheels: SAGE_SPKG_WHEELS

setenv =
# Sage scripts such as sage-runtests like to use $HOME/.sage
HOME={envdir}

passenv =
SAGE_NUM_THREADS
SAGE_NUM_THREADS_PARALLEL
# We supply pip options by environment variables so that they
# apply both to the installation of the dependencies and of the package
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
nopypi: PIP_NO_INDEX=true

whitelist_externals =
bash

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 =
SAGE_VENV

basepython = {env:SAGE_VENV}/bin/python3
22 changes: 18 additions & 4 deletions pkgs/sagemath-objects/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,27 @@ envlist =
deps =
!norequirements: -rrequirements.txt

extras = test

passenv =
# Variables set by .homebrew-build-env
CPATH
LIBRARY_PATH
PKG_CONFIG_PATH
# Parallel build
SAGE_NUM_THREADS
# SAGE_VENV only for finding the wheels
sagewheels: SAGE_VENV
# Location of the wheels
sagewheels: SAGE_SPKG_WHEELS

setenv =
# Sage scripts such as sage-runtests like to use $HOME/.sage
HOME={envdir}

passenv =
SAGE_NUM_THREADS
SAGE_NUM_THREADS_PARALLEL
# We supply pip options by environment variables so that they
# apply both to the installation of the dependencies and of the package
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
nopypi: PIP_NO_INDEX=true

whitelist_externals =
bash
Expand Down
29 changes: 25 additions & 4 deletions pkgs/sagemath-repl/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,33 @@
# pkgs/sagemath-repl/.tox/python/bin/python
#
[tox]
envlist =
sagepython-norequirements

isolated_build = True

[testenv]
deps = -rrequirements.txt

passenv =
# Variables set by .homebrew-build-env
CPATH
LIBRARY_PATH
PKG_CONFIG_PATH
# Parallel build
SAGE_NUM_THREADS
# SAGE_VENV only for finding the wheels
sagewheels: SAGE_VENV
# Location of the wheels
sagewheels: SAGE_SPKG_WHEELS

setenv =
# Sage scripts such as sage-runtests like to use $HOME/.sage
HOME={envdir}

passenv =
SAGE_NUM_THREADS
SAGE_NUM_THREADS_PARALLEL
# We supply pip options by environment variables so that they
# apply both to the installation of the dependencies and of the package
sagewheels: PIP_FIND_LINKS=file://{env:SAGE_SPKG_WHEELS:{env:SAGE_VENV:{toxinidir}/../../../../venv}/var/lib/sage/wheels}
nopypi: PIP_NO_INDEX=true

whitelist_externals =
bash
Expand All @@ -28,3 +43,9 @@ commands =
python -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)"'

[testenv:sagepython]
passenv =
SAGE_VENV

basepython = {env:SAGE_VENV}/bin/python3

0 comments on commit f6a2ee2

Please sign in to comment.