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: |
| 3 | # http://pypi.python.org/pypi/tox |
| 4 | # http://tox.testrun.org/ |
| 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: |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 16 | # tox -e py27 |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 17 | |
| 18 | # Extra arguments will be passed to test-installed-numpy.py. To run |
| 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 |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 25 | # installed and that they can be run as 'python2.7', 'python3.3', etc. |
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 = |
Alexandr Shadchin | 5006fa0 | 2017-03-08 18:04:56 | [diff] [blame] | 29 | py27,py34,py35,py36, |
Alexandr Shadchin | 28f9b8b | 2017-03-05 20:34:20 | [diff] [blame] | 30 | py27-not-relaxed-strides,py34-not-relaxed-strides |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 31 | |
| 32 | [testenv] |
| 33 | deps= |
| 34 | nose |
| 35 | changedir={envdir} |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 36 | commands={envpython} {toxinidir}/tools/test-installed-numpy.py --mode=full {posargs:} |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 37 | |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 38 | [testenv:py27-not-relaxed-strides] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 39 | basepython=python2.7 |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 40 | env=NPY_RELAXED_STRIDES_CHECKING=0 |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 41 | |
Alex Willmer | f179ec9 | 2015-08-04 17:44:39 | [diff] [blame] | 42 | [testenv:py34-not-relaxed-strides] |
| 43 | basepython=python3.4 |
| 44 | env=NPY_RELAXED_STRIDES_CHECKING=0 |
| 45 | |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 46 | # Not run by default. Set up the way you want then use 'tox -e debug' |
| 47 | # if you want it: |
| 48 | [testenv:debug] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 49 | basepython=python-dbg |
| 50 | commands=gdb --args {envpython} {toxinidir}/tools/test-installed-numpy.py --mode=full {posargs:} |