3 # Build, install, and test the gmxapi 0.1.x Python package distributed with
6 # It is assumed that this script is run in an activated Python venv with the
7 # gmxapi dependencies already installed, with `python` resolvable by the shell
8 # to the appropriate Python interpreter.
10 # This script is intended to support automated GROMACS testing infrastructure,
11 # and may be removed without notice.
13 # WARNING: This script assumes OpenMPI mpiexec. Syntax for launch wrappers from
14 # other implementations will need different syntax, and we should get a
15 # MPIRUNNER from the environment, or something.
17 # Make sure the script errors if any commands error.
20 # Create "sdist" source distribution archive.
21 pushd python_packaging/src
22 GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
24 # TODO: Identify SDIST
26 # Build and install from sdist.
27 GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
28 python -m pip install \
32 --no-build-isolation \
34 # TODO: Build and install from $SDIST instead of wildcard.
37 # Run Python unit tests.
38 python -m pytest $PWD/python_packaging/src/test --junitxml=$PY_UNIT_TEST_XML
39 # TODO: enable MPI tests
40 #if [ -x `which mpiexec` ]; then
41 # PYTHONDONTWRITEBYTECODE=1 \
42 # mpiexec --allow-run-as-root \
43 # --mca opal_warn_on_missing_libcuda 0 \
44 # --mca orte_base_help_aggregate 0 \
46 # `which python` -m pytest \
47 # -p no:cacheprovider \
48 # $PWD/python_packaging/src/test \
49 # --junitxml=$PY_MPI_UNIT_TEST_XML
52 # Run Python acceptance tests.
53 python -m pytest $PWD/python_packaging/test --junitxml=$PY_ACCEPTANCE_TEST_XML
54 # TODO: enable MPI tests
55 #if [ -x `which mpiexec` ]; then
56 # PYTHONDONTWRITEBYTECODE=1 \
57 # mpiexec --allow-run-as-root \
58 # --mca opal_warn_on_missing_libcuda 0 \
59 # --mca orte_base_help_aggregate 0 \
61 # `which python` -m pytest \
62 # -p no:cacheprovider \
63 # $PWD/python_packaging/test \
64 # --junitxml=$PY_MPI_ACCEPTANCE_TEST_XML