How should Python package find GROMACS resources under various circumstances? - Redmine #2961
Under different scenarios (see parent issue) during or after configuration, build, and installation, a Python package built from the GROMACS repo needs to know where to find GROMACS resources.
This issue does not yet enumerate all scenarios.
Client code (including the Python package, when build with Python packaging tools) should use the same C standard library when processing public headers. It could be helpful to write a CMakeToolchain.txt file with the GROMACS installation so that a dependent CMake configuration can be launched with effective hints before find_package() is run.
Early implementations need to know where the gmx
wrapper binary is. We
could configure a gmxrc.py module at the same time GMXRC files are
configured. If we want to run tests from the build tree before
installation, though, we need an alternative. Another option would be to
attach properties to a CMake target that are different for the build
tree target or an imported target.
If there are any other data that need to be provided to libgromacs through the posix environment, like GMXDATA, then that also needs to be addressed.
(from redmine: issue id 2961, created on 2019-05-28 by eirrgang)
- Relations:
- relates #3111 (closed)
- relates #3133 (closed)
- relates #3177 (closed)
- relates #3014 (closed)
- parent #2896 (closed)
- Changesets:
- Revision 6ec0f1f1 by Eric Irrgang on 2019-08-08T18:19:44Z:
Allow gmxapi Python package tests to be run from GROMACS build tree.
* Configure gmxapi._gmxapi to build with the ability to find libgmxapi.
* Add a gmxapi_pytest custom CMake target to invoke pytest.
Refs #2961
Refs #2756
Change-Id: I64ca82afbf37da3c37759ec302c2ac9cc1666de2
- Revision dcc396afeabe50e837abd5f1d518ab21d0651d1b by Eric Irrgang on 2019-09-10T12:20:41Z:
Make gmxcli pytest fixture more robust.
Look for multiple possible `gmx` command line executables.
This change may be followed up, amended, replaced, or superseded by
change Icefe89e97009110be55dc8e1f3db5726ec1fe53a but is necessary
now to support child changes under review.
Refs #2961
Change-Id: I7d9d830c1b16fbd2af86aded3f1fea5f3a63307f
- Revision 1913e5be by Eric Irrgang on 2019-09-10T16:27:41Z:
Make gmxcli pytest fixture more robust.
Look for multiple possible `gmx` command line executables.
This change may be followed up, amended, replaced, or superseded by
change Icefe89e97009110be55dc8e1f3db5726ec1fe53a but is necessary
now to support child changes under review.
Refs #2961
Change-Id: I7d9d830c1b16fbd2af86aded3f1fea5f3a63307f
- Revision 5e5da871 by Paul Bauer on 2019-09-11T17:24:04Z:
Basic toolchain to facilitate GMXAPI build
Adds a basic toolchain file and install directives for it.
This is aimed at having one point for the API to look up how
a native GROMACS installation was build and allow the bindings for the
API to be build in the same way.
Added hint for directory to GMXRC so that it will be easier to find.
Refs #2961
Change-Id: Icefe89e97009110be55dc8e1f3db5726ec1fe53a
- Revision c27d7f42 by Eric Irrgang on 2019-09-11T17:25:55Z:
Use GROMACS CMake toolchain file for gmxapi Python package build.
Refs #2961
Change-Id: If085425879f00a8a8573627dbec197afa39c2ab0
- Revision 3ef3736c by Eric Irrgang on 2019-10-31T15:51:34Z:
Restore CMake convenience targets for sample_restraint.
When building GROMACS with GMX_PYTHON_PACKAGE=ON, the Python and C++
tests in python_packaging/sample_restraint are configured for use in
the GROMACS build tree. Let the tests in
python_packaging/sample_restraint use input data from
src/testutils/simulationdatabase.
Refs #2961
Change-Id: Ida104dc224e7a6af3874bd0604439033fe4f72a1