Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 1 | # 'Tox' is a tool for automating sdist/build/test cycles against |
| 2 | # multiple Python versions: |
Mike Toews | 83828f5 | 2018-06-16 06:18:19 | [diff] [blame] | 3 | # https://pypi.python.org/pypi/tox |
| 4 | # https://tox.readthedocs.io/ |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 5 | |
| 6 | # Running the command 'tox' while in the root of the numpy source |
| 7 | # directory will: |
| 8 | # - Create a numpy source distribution (setup.py sdist) |
| 9 | # - Then for every supported version of Python: |
| 10 | # - Create a virtualenv in .tox/py$VERSION and install |
| 11 | # dependencies. (These virtualenvs are cached across runs unless |
| 12 | # you use --recreate.) |
| 13 | # - Use pip to install the numpy sdist into the virtualenv |
| 14 | # - Run the numpy tests |
| 15 | # To run against a specific subset of Python versions, use: |
Brigitta Sipőcz | d4d5771 | 2022-05-21 01:34:06 | [diff] [blame] | 16 | # tox -e py39 |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 17 | |
Tyler Reddy | 030ebff | 2019-07-13 16:39:07 | [diff] [blame] | 18 | # Extra arguments will be passed to runtests.py. To run |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 19 | # the full testsuite: |
| 20 | # tox full |
| 21 | # To run with extra verbosity: |
| 22 | # tox -- -v |
| 23 | |
| 24 | # Tox assumes that you have appropriate Python interpreters already |
Mike Taves | 2ceee87 | 2020-01-22 07:37:47 | [diff] [blame] | 25 | # installed and that they can be run as (e.g.) 'python3.8' |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 26 | |
| 27 | [tox] |
Alex Willmer | f179ec9 | 2015-08-04 17:44:39 | [diff] [blame] | 28 | envlist = |
Brigitta Sipőcz | d4d5771 | 2022-05-21 01:34:06 | [diff] [blame] | 29 | py38,py39 |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 30 | |
| 31 | [testenv] |
mattip | 037a613 | 2019-09-09 08:26:28 | [diff] [blame] | 32 | deps= -Ur{toxinidir}/test_requirements.txt |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 33 | changedir={envdir} |
Jon Dufresne | 7f1293f | 2019-08-27 00:38:16 | [diff] [blame] | 34 | commands={envpython} -b {toxinidir}/runtests.py --mode=full {posargs:} |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 35 | |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 36 | # Not run by default. Set up the way you want then use 'tox -e debug' |
| 37 | # if you want it: |
| 38 | [testenv:debug] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 39 | basepython=python-dbg |
Tyler Reddy | 030ebff | 2019-07-13 16:39:07 | [diff] [blame] | 40 | commands=gdb --args {envpython} {toxinidir}/runtests.py --mode=full {posargs:} |