@@ -154,7 +154,7 @@ def check_libPath(slurm_path):
154154 return slurm_path
155155 else :
156156 info ("Build - Cannot locate Slurm shared library in %s" % slurm_path )
157- return ''
157+ return None
158158
159159 # if base dir given then search lib64 and then lib
160160 for libpath in ['lib64' , 'lib' ]:
@@ -164,8 +164,12 @@ def check_libPath(slurm_path):
164164 info ("Build - Found Slurm shared library in %s" % slurmlibPath )
165165 return slurmlibPath
166166
167+ if os .path .exists ('%s/libslurm.so' % SLURM_LIB ):
168+ info ('Build - Found Slurm shared library in %s' % SLURM_LIB )
169+ return SLURM_LIB
170+
167171 info ("Build - Could not locate Slurm shared library in %s" % slurm_path )
168- return ''
172+ return None
169173
170174
171175def create_bluegene_include ():
@@ -255,14 +259,12 @@ def build():
255259 usage ()
256260
257261 # Test for slurm.h maybe from derived paths
258- if not os .path .exists ("%s/slurm/slurm.h" % SLURM_INC ):
259- info ("Build - Cannot locate the Slurm include in %s" % SLURM_INC )
260- usage ()
261- elif not os .path .exists ("%s/slurm.h" % SLURM_INC ):
262- info ("Build - Cannot locate the Slurm include in %s" % SLURM_INC )
263- usage ()
262+ if os .path .exists ("%s/slurm/slurm.h" % SLURM_INC ):
263+ info ("Build - Found the Slurm header in %s" % SLURM_INC )
264+ elif os .path .exists ("%s/slurm.h" % SLURM_INC ):
265+ info ("Build - Found the Slurm header in %s" % SLURM_INC )
264266 else :
265- info ("Build - Found Slurm header in %s" % SLURM_INC )
267+ fatal ("Build - Cannot locate the Slurm header in %s" % SLURM_INC )
266268
267269 # Test for supported min and max Slurm versions
268270 try :
@@ -290,7 +292,7 @@ def build():
290292def parse_setuppy_commands ():
291293 args = sys .argv [1 :]
292294
293- if len ( args ) == 0 :
295+ if not args :
294296 usage ()
295297 else :
296298 # Set BGQ if --bgq argument provided
0 commit comments