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

Commit

Permalink
pkgs/sagemath-gap/tox.ini: New
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoeppe committed Dec 3, 2022
1 parent a2feea0 commit 665d01c
Showing 1 changed file with 64 additions and 0 deletions.
64 changes: 64 additions & 0 deletions pkgs/sagemath-gap/tox.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# To build and test in the tox environment:
#
# ./sage -sh -c '(cd pkgs/sagemath-gap && tox -v -v -v -e sagepython)'
#
# To test interactively:
#
# pkgs/sagemath-gap/.tox/sagepython/bin/python
#
[tox]
envlist =
sagepython-norequirements

[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

passenv =
# Variables set by .homebrew-build-env
CPATH
LIBRARY_PATH
PKG_CONFIG_PATH
# Parallel build
SAGE_NUM_THREADS
SAGE_NUM_THREADS_PARALLEL
# SAGE_VENV only for referring to the basepython or finding the wheels
sagepython, 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}
# 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 install sage package.
# Importing sage.libs.gap.libgap does not work yet because of the runtime dep on 'sage.rings.polynomial'
# {envpython} -c 'import sys; "" in sys.path and sys.path.remove(""); import sage.libs.gap.libgap'


[testenv:sagepython]
basepython = {env:SAGE_VENV}/bin/python3

[testenv:sagepython-sagewheels-nopypi]
basepython = {env:SAGE_VENV}/bin/python3

[testenv:sagepython-sagewheels-nopypi-norequirements]
basepython = {env:SAGE_VENV}/bin/python3

[testenv:sagepython-sagewheels]
basepython = {env:SAGE_VENV}/bin/python3

[testenv:sagepython-norequirements]
basepython = {env:SAGE_VENV}/bin/python3

0 comments on commit 665d01c

Please sign in to comment.