3 # Build, install, and test the gmxapi 0.2 Python package developed with
6 # This script assumes 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 # TODO: Remove extraneous environment variable with resolution of #3273
23 # Ref: https://redmine.gromacs.org/issues/3273
24 GMXTOOLCHAINDIR
=$INSTALL_DIR/share
/cmake
/gromacs \
26 # TODO: Identify SDIST
28 # Build and install from sdist.
29 # Note that tool chain may be provided differently in GROMACS 2020 and 2021.
30 GMXTOOLCHAINDIR
=$INSTALL_DIR/share
/cmake
/gromacs \
31 python
-m pip
install \
35 --no-build-isolation \
37 # TODO: Build and install from $SDIST instead of wildcard.
41 # Run Python unit tests.
42 python
-m pytest python_packaging
/src
/test --junitxml=$PY_UNIT_TEST_XML
43 # TODO: enable MPI tests
44 #if [ -x `which mpiexec` ]; then
45 # PYTHONDONTWRITEBYTECODE=1 \
46 # mpiexec --allow-run-as-root \
47 # --mca opal_warn_on_missing_libcuda 0 \
48 # --mca orte_base_help_aggregate 0 \
50 # `which python` -m pytest \
51 # -p no:cacheprovider \
52 # $PWD/python_packaging/src/test \
53 # --junitxml=$PY_MPI_UNIT_TEST_XML
56 # Run Python acceptance tests.
57 python
-m pytest python_packaging
/test --junitxml=$PY_ACCEPTANCE_TEST_XML
58 # TODO: enable MPI tests
59 #if [ -x `which mpiexec` ]; then
60 # PYTHONDONTWRITEBYTECODE=1 \
61 # mpiexec --allow-run-as-root \
62 # --mca opal_warn_on_missing_libcuda 0 \
63 # --mca orte_base_help_aggregate 0 \
65 # `which python` -m pytest \
66 # -p no:cacheprovider \
67 # $PWD/python_packaging/test \
68 # --junitxml=$PY_MPI_ACCEPTANCE_TEST_XML