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 = |
| 29 | py26,py27,py32,py33,py34, |
| 30 | py27-monolithic,py33-monolithic,py34-monolithic, |
| 31 | py27-not-relaxed-strides,py33-not-relaxed-strides,py34-not-relaxed-strides |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 32 | |
| 33 | [testenv] |
| 34 | deps= |
| 35 | nose |
| 36 | changedir={envdir} |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 37 | commands={envpython} {toxinidir}/tools/test-installed-numpy.py --mode=full {posargs:} |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 38 | |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 39 | [testenv:py27-monolithic] |
Nathaniel J. Smith | 64c3a8f | 2012-07-11 13:26:33 | [diff] [blame] | 40 | basepython=python2.7 |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 41 | env=NPY_SEPARATE_COMPILATION=0 |
Nathaniel J. Smith | 64c3a8f | 2012-07-11 13:26:33 | [diff] [blame] | 42 | |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 43 | [testenv:py33-monolithic] |
| 44 | basepython=python3.3 |
| 45 | env=NPY_SEPARATE_COMPILATION=0 |
| 46 | |
Alex Willmer | f179ec9 | 2015-08-04 17:44:39 | [diff] [blame] | 47 | [testenv:py34-monolithic] |
| 48 | basepython=python3.4 |
| 49 | env=NPY_SEPARATE_COMPILATION=0 |
| 50 | |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 51 | [testenv:py27-not-relaxed-strides] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 52 | basepython=python2.7 |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 53 | env=NPY_RELAXED_STRIDES_CHECKING=0 |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 54 | |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 55 | [testenv:py33-not-relaxed-strides] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 56 | basepython=python3.3 |
Charles Harris | d1422d3 | 2014-05-06 15:37:38 | [diff] [blame] | 57 | env=NPY_RELAXED_STRIDES_CHECKING=0 |
Nathaniel J. Smith | 64c3a8f | 2012-07-11 13:26:33 | [diff] [blame] | 58 | |
Alex Willmer | f179ec9 | 2015-08-04 17:44:39 | [diff] [blame] | 59 | [testenv:py34-not-relaxed-strides] |
| 60 | basepython=python3.4 |
| 61 | env=NPY_RELAXED_STRIDES_CHECKING=0 |
| 62 | |
Nathaniel J. Smith | e3e5028 | 2012-05-21 22:33:19 | [diff] [blame] | 63 | # Not run by default. Set up the way you want then use 'tox -e debug' |
| 64 | # if you want it: |
| 65 | [testenv:debug] |
Pauli Virtanen | 7f8aefc | 2013-05-11 11:28:42 | [diff] [blame] | 66 | basepython=python-dbg |
| 67 | commands=gdb --args {envpython} {toxinidir}/tools/test-installed-numpy.py --mode=full {posargs:} |