add additional heuristics to prevent python unit tests from failing on MacOS
This commit is contained in:
@ -99,6 +99,7 @@ class lammps(object):
|
|||||||
# so that LD_LIBRARY_PATH does not need to be set for regular install
|
# so that LD_LIBRARY_PATH does not need to be set for regular install
|
||||||
# fall back to loading with a relative path,
|
# fall back to loading with a relative path,
|
||||||
# typically requires LD_LIBRARY_PATH to be set appropriately
|
# typically requires LD_LIBRARY_PATH to be set appropriately
|
||||||
|
# guess shared library extension based on OS, if not inferred from actual file
|
||||||
|
|
||||||
if any([f.startswith('liblammps') and f.endswith('.dylib')
|
if any([f.startswith('liblammps') and f.endswith('.dylib')
|
||||||
for f in os.listdir(modpath)]):
|
for f in os.listdir(modpath)]):
|
||||||
@ -111,7 +112,13 @@ class lammps(object):
|
|||||||
lib_ext = ".dll"
|
lib_ext = ".dll"
|
||||||
modpath = winpath
|
modpath = winpath
|
||||||
else:
|
else:
|
||||||
lib_ext = ".so"
|
import platform
|
||||||
|
if platform.system() == "Darwin":
|
||||||
|
lib_ext = ".dylib"
|
||||||
|
elif platform.system() == "Windows":
|
||||||
|
lib_ext = ".dll"
|
||||||
|
else:
|
||||||
|
lib_ext = ".so"
|
||||||
|
|
||||||
if not self.lib:
|
if not self.lib:
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user