[BUG] Sire build environment cannot be solved when using setup.py
Following the update the our Boost dependency in #336 it appears that Sire can no longer be built using the setup.py file, which the install hanging at the environment resolution stage. I've only tested this on Linux, but the problem happens for all Python variants tested. Building via conda-build works fine, but this is useless for a development environment.
On my local machine, it's specifically the required RDKit pin that's causing the issue. Using the following diff works:
diff --git a/requirements_host.txt b/requirements_host.txt
index ef32ada64..a06788fc6 100644
--- a/requirements_host.txt
+++ b/requirements_host.txt
@@ -6,7 +6,7 @@ libboost-devel
libboost-python-devel
libcblas
libnetcdf
-librdkit-dev > 2024.09.6
+librdkit-dev
openmm >= 8.1
pandas
python
This is a pain since the whole point of the fix in #336 was to enable a more recent RDKit. With the change above we end up with the broken version:
rdkit conda-forge/linux-64::rdkit-2024.03.5-py312hf6fb7c8_0
I think I've just going to have to make this change locally for now and come back to solving this at a later date. Having a working conda package is the most important thing, although this will mean that the development environment won't match the release, which is a pain.
The environment is resolvable if you create it in one go, e.g:
conda create -n openbiosim -c conda-forge python=3.12 "cmake>=3.30.0" git libtool make sysroot_linux-64==2.17 gsl "kartograf>=1.0.0" lazy_import libboost-devel libboost-python-devel libcblas libnetcdf "librdkit-dev>2024.09.6" "openmm>=8.1" pandas qt-main rich tbb tbb-devel alchemlyb "ambertools>=22" configargparse gromacs ipywidgets kcombu_bss lomap2 mdanalysis mdtraj nglview openff-interchange-base openff-toolkit-base "openmmtools>=0.21.5" parmed py3dmol pydot pygtail pyyaml ase deepmd-kit loguru nnpops pygit2 pytorch
I might need to change the build script to do this for the user.
My thought is that we replace the build with a create_environment script that sets up the initial environment with everything installed and resolved in one go. Then the user activates the environment and compiles Sire into it.
I agree - this sounds like a sensible solution. It also matches my workflow, e.g. in a new env I will run "setup.py --install-bss-deps install" or "setup.py install" (or "setup.py --skip-dep kartograf" if I want to skip individual dependencies).
However, after the first compile, I then use "setup.py --skip-deps install" as I don't want to waste time re-solving the environment.
It is probably better to divide this into two steps as you say.