add special case for windows installer package where the .dll file is in the bin folder

This commit is contained in:
Axel Kohlmeyer
2020-09-29 18:46:32 -04:00
parent e4cfb91169
commit 555fba1e4b

View File

@ -169,6 +169,8 @@ class lammps(object):
# determine module file location
modpath = dirname(abspath(getsourcefile(lambda:0)))
# for windows installers the shared library is in a different folder
winpath = abspath(os.path.join(modpath,'..','bin'))
self.lib = None
self.lmp = None
@ -197,6 +199,10 @@ class lammps(object):
elif any([f.startswith('liblammps') and f.endswith('.dll')
for f in os.listdir(modpath)]):
lib_ext = ".dll"
elif any([f.startswith('liblammps') and f.endswith('.dll')
for f in os.listdir(winpath)]):
lib_ext = ".dll"
modpath = winpath
else:
lib_ext = ".so"