forked from mpi4py/mpi4py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
184 lines (171 loc) · 5.04 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# Tox (https://tox.readthedocs.io) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it,
# "pip install tox" and then run "tox" from this directory.
[tox]
minversion = 3.18.0
skip_missing_interpreters=True
envlist =
py36
py37
py38
py39
py310
py311
py312
pypy3.7
pypy3.8
pypy3.9
[env]
passenv =
CPPFLAGS
CFLAGS
CXXFLAGS
LDFLAGS
MPI4PY_*
MPICFG
MPICC
MPICXX
MPILD
MPIEXEC
MPIEXEC_*
HYDRA_*
MPICH_*
OMPI_*
I_MPI_*
MSMPI_*
MV2_*
[mpi]
mpicc = {env:MPICC:mpicc}
mpicxx = {env:MPICXX:mpicxx}
mpiexec = {env:MPIEXEC:mpiexec}
[testenv:.pkg]
passenv = {[env]passenv}
[testenv]
labels = test
deps = -r{toxinidir}/conf/requirements-test.txt
allowlist_externals = {[mpi]mpiexec}
passenv = {[env]passenv}
commands =
{[mpi]mpiexec} -n 1 {envpython} -m mpi4py --version
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench helloworld
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench ringtest
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench pingpong -q -n 4096
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py -m mpi4py.bench futures -q -n 4096
{[mpi]mpiexec} -n 1 {envpython} {toxinidir}/test/runtests.py --no-builddir -q -e spawn []
{[mpi]mpiexec} -n 5 {envpython} {toxinidir}/test/runtests.py --no-builddir -q -e spawn []
{[mpi]mpiexec} -n 1 {envpython} {toxinidir}/demo/futures/test_futures.py -q []
{[mpi]mpiexec} -n 5 {envpython} {toxinidir}/demo/futures/test_futures.py -q []
{[mpi]mpiexec} -n 1 {envpython} -m mpi4py.futures {toxinidir}/demo/futures/test_futures.py -q []
{[mpi]mpiexec} -n 5 {envpython} -m mpi4py.futures {toxinidir}/demo/futures/test_futures.py -q []
{envpython} {toxinidir}/demo/test-run/test_run.py -q []
[testenv:build-cmake]
labels = build,cmake
deps = build
skip_install = true
allowlist_externals = {[mpi]mpiexec},rm
passenv = {[env]passenv}
setenv =
CFLAGS=-O0 -Wp,-U_FORTIFY_SOURCE
MPI4PY_BUILD_BACKEND=cmake
commands_pre =
rm -rf build
commands =
{envpython} -m build --outdir {envtmpdir}/dist
{envpython} -m pip install --verbose .
mpiexec -n 1 {envpython} test/main.py test_package
[testenv:build-meson]
labels = build,meson
deps = build
skip_install = true
allowlist_externals = {[mpi]mpiexec},rm
passenv = {[env]passenv}
setenv =
CFLAGS=-O0 -Wp,-U_FORTIFY_SOURCE
MPI4PY_BUILD_BACKEND=meson
commands_pre =
rm -rf .mesonpy-*
commands =
{envpython} -m build --outdir {envtmpdir}/dist
{envpython} -m pip install --verbose .
mpiexec -n 1 {envpython} test/main.py test_package
[testenv:code]
labels = code
deps = setuptools -r{toxinidir}/conf/requirements-build-cython.txt
skip_install = true
allowlist_externals = mv
setenv =
MPICFG=nompi
CFLAGS=-O0 -Wp,-U_FORTIFY_SOURCE
commands =
{envpython} conf/mpiapigen.py
{envpython} setup.py --quiet build -b build/code --force
mv src/lib-mpi/pympiconf.h conf/nompi/pympiconf.h
{envpython} setup.py --quiet build -b build/code install --force
{envpython} conf/mpistubgen.py
[testenv:conf]
labels = conf,check
deps = setuptools -r{toxinidir}/conf/requirements-build-cython.txt
skip_install = true
allowlist_externals = diff
setenv =
MPICFG=nompi
CFLAGS=-O0 -Wp,-U_FORTIFY_SOURCE
commands =
{envpython} setup.py --quiet build -b build/conf --force
diff -u conf/nompi/pympiconf.h src/lib-mpi/pympiconf.h
[testenv:lint]
labels = lint,check
deps = -r{toxinidir}/conf/requirements-lint.txt
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
commands =
ruff .
flake8 docs src
flake8 --select=A {toxinidir}/test
pylint mpi4py
codespell
[testenv:type]
labels = type,check
deps = -r{toxinidir}/conf/requirements-type.txt
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
commands =
stubtest mpi4py
mypy --python-version 3.12 -p mpi4py
mypy --python-version 3.11 -p mpi4py
mypy --python-version 3.10 -p mpi4py
mypy --python-version 3.9 -p mpi4py
mypy --python-version 3.8 -p mpi4py
[cmd]
rst2html5 = rst2html5.py
[testenv:docs]
labels = docs
deps = -r{toxinidir}/conf/requirements-docs.txt
allowlist_externals = rm,mv
setenv =
MPICFG=nompi-fast
CFLAGS=-O0
TOPDIR=
DOCDIR=docs/
SRCDIR=docs/source/
BLDDIR=build/
OUTDIR=docs/
LATEXMKOPTS=-quiet
commands_pre =
rm -rf {env:OUTDIR}html
commands =
{envpython} -m pip uninstall --yes sphinx-rtd-theme
{[cmd]rst2html5} {env:DOCDIR}index.rst {env:OUTDIR}index.html
sphinx-build -M html {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M man {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M info {env:SRCDIR} {env:BLDDIR} -q -W -j auto
sphinx-build -M latexpdf {env:SRCDIR} {env:BLDDIR} -q -W -j auto
rm -r {env:SRCDIR}/reference
rm {env:BLDDIR}html/.buildinfo
mv {env:BLDDIR}html {env:OUTDIR}
mv {env:BLDDIR}man/mpi4py.3 {env:OUTDIR}
mv {env:BLDDIR}texinfo/mpi4py.info {env:OUTDIR}
mv {env:BLDDIR}latex/mpi4py.pdf {env:OUTDIR}