# Make sure to delete any accidentally lingering build artifacts.
rm -rf build dist
# Build and install the gmxapi Python package.
-# TODO(#4092): Revert to using --no-deps and --no-index once Docker images updated.
+ # TODO(#3273): Reduce requirements for `setup.py` `sdist` command and provide build artifact.
GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
python -m pip install \
+ --no-build-isolation \
--no-cache-dir \
+ --no-deps \
+ --no-index \
.
-# # TODO(#3273): Reduce requirements for `setup.py` `sdist` command and provide build artifact.
-# GMXTOOLCHAINDIR=$INSTALL_DIR/share/cmake/gromacs \
-# python -m pip install \
-# --no-cache-dir \
-# --no-deps \
-# --no-index \
-# .
popd
# Run Python unit tests.
'networkx>=2.0' \
'numpy>=1' \
'pip>=10.1' \
+ 'pybind11>2.6' \
'Pygments>=2.2.0' \
'pytest>=3.9' \
'setuptools>=42' \
+ 'scikit-build>=0.10' \
'Sphinx>=1.6.3' \
- 'sphinxcontrib-plantuml>=0.14'""")
-
- # TODO: Remove 'importlib_resources' dependency when Python >=3.7 is required.
- if minor == 6:
- commands.append(f"""{venv_path}/bin/python -m pip install --upgrade \
- 'importlib_resources'""")
-
+ 'sphinxcontrib-plantuml>=0.14' \
+ 'wheel'""")
return commands
# without additional hinting. Once CMakeCache.txt exists, the later stages
# should work fine without reactivating the venv.
- source /root/venv/py3.7/bin/activate
- # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
- - /root/venv/py3.7/bin/pip install pybind11
- cmake ..
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
$CMAKE_COMPILER_SCRIPT
fi
- cd $RELEASE_BUILD_DIR
- source /root/venv/py3.7/bin/activate
- # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
- - /root/venv/py3.7/bin/pip install pybind11
- cmake ../$RELEASE_SOURCE/
-DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER_LAUNCHER=ccache
$CMAKE_COMPILER_SCRIPT
image: ${CI_REGISTRY}/gromacs/gromacs/ci-ubuntu-20.04-llvm-7-docs
script:
- cd $BUILD_DIR
- # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
- - /root/venv/py3.7/bin/pip install pybind11
- cmake --build . --target gmx -- -j8
- cd ..
artifacts:
- cd $BUILD_DIR
- cmake --build . --target manual -- -j4 | tee docs/manual/all-output.log
| grep -i "warning" | grep -v "TeX" | grep -v "Package" || true
- # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
- - /root/venv/py3.7/bin/pip install pybind11
- cmake --build . --target webpage -- -j4
- grep "WARNING:" docs/manual/all-output.log | tee pythonErrors.log || true
- grep -i "error" docs/sphinx-*.log | tee sphinxDiagnostics.log || true
script:
- CMAKE=${CMAKE:-$(which cmake)}
- cd $BUILD_DIR
- # TODO(#4092) Remove `pip install pybind11` once CI images are updated.
- - /root/venv/py3.7/bin/pip install pybind11
- $CMAKE --build . --target check-source
- awk '/warning.*include style.*order/,/You can use.*rst|^$/' docs/doxygen/check-source.log | tee doxygenError.txt || true
- awk '/warning:.*includes/,/unnecessarily|^$/' docs/doxygen/check-source.log | tee -a doxygenError.txt || true
if suffix is not None:
gmx_toolchain_dir = os.path.join(share_cmake, 'gromacs' + suffix)
- if gmx_toolchain_dir is None:
+ if gmx_toolchain_dir is None or not os.path.exists(gmx_toolchain_dir):
print(usage)
- raise GmxapiInstallError('Could not configure for GROMACS installation. Provide GMXTOOLCHAINDIR.')
+ raise GmxapiInstallError(
+ 'Could not configure for GROMACS installation. '
+ 'Provide GMXTOOLCHAINDIR or CMAKE_TOOLCHAIN_FILE. '
+ 'See https://manual.gromacs.org/current/gmxapi/userguide/install.html'
+ )
suffix = os.path.basename(gmx_toolchain_dir).strip('gromacs')
gmx_toolchain = os.path.abspath(os.path.join(gmx_toolchain_dir, 'gromacs-toolchain' + suffix + '.cmake'))