-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow pybamm-requires
to return early if an existing SUNDIALS installation is found
#3418
Comments
import os BUILD_TIME_COMPONENTS = ["suitesparse", "sundials"] def should_skip_component(component): def install_build_time_components():
def main():
if name == "main": Will something like this work? Define list of build time components to check |
Yes; something like this should work fine, though the details of its implementation would vary slightly since this is to be added in the The SUNDIALS and SuiteSparse installation locations can be determined by reading through |
I've tried to solve the issue, would appreciate feedback |
…ing SUNDIALS installation is found
The
pybamm-requires
session, activated by thenox -s pybamm-requires
command, can be sped up by detecting the build-time components in the $HOME directory. Note: this would be similar to whatpybamm_install_odes
already does; the script can find an installation of SUNDIALS and move to the next steps, i.e., installingscikits.odes
.However, in cases of a corrupt installation of SuiteSparse and SUNDIALS, we can force the re-installation by
nox
's posargs feature: providing the-f
or the--force
command-line flag when invoking the session will re-compile them. We already do this for thepybind11
directory in the session by not cloning the repository if it is found.This way, users can skip the re-installation of the build-time components if already present but still factor in the cases where it is necessary for them to reinstall for debugging purposes. Another way this will help will be to skip the session in CI if a cache-hit occurs (we don't need to bother about validating the caches because GitHub Actions runners would already do that for us)
The text was updated successfully, but these errors were encountered: