From 923b0cfc4638dd39ac229f46f7d9cd8a1a380250 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sun, 30 Jan 2022 05:13:17 -0500 Subject: [PATCH] allow to override the LAMMPS dll location on windows this is to work around the situation that windows has no equivalent to LD_LIBRARY_PATH (short of augmenting %PATH%, which is tricky for CMake before 3.20) --- python/lammps/core.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/python/lammps/core.py b/python/lammps/core.py index 0bc8d0cb3f..62b0f5d8b6 100644 --- a/python/lammps/core.py +++ b/python/lammps/core.py @@ -89,6 +89,9 @@ class lammps(object): modpath = dirname(abspath(getsourcefile(lambda:0))) # for windows installers the shared library is in a different folder winpath = abspath(os.path.join(modpath,'..','..','bin')) + # allow override for running tests on Windows + if (os.environ.get("LAMMPSDLLPATH")): + winpath = os.environ.get("LAMMPSDLLPATH") self.lib = None self.lmp = None