3232from easybuild .framework .easyblock import EasyBlock
3333from easybuild .easyblocks .generic .binary import Binary
3434from easybuild .tools .build_log import EasyBuildError
35- from easybuild .tools .filetools import copy
35+ from easybuild .tools .filetools import change_dir , copy
3636
3737
3838class PackedBinary (Binary , EasyBlock ):
@@ -46,16 +46,16 @@ def extract_step(self):
4646
4747 def install_step (self ):
4848 """Copy all unpacked source files/directories to install directory, one-by-one."""
49- os . chdir (self .builddir )
49+ change_dir (self .builddir )
5050 for src in os .listdir (self .builddir ):
5151 srcpath = os .path .join (self .builddir , src )
5252 # we only handle the case of a single file and no install_cmd here
53- if os .path .isfile (src ) and self .cfg .get ('install_cmd' , None ) is None :
53+ if os .path .isfile (srcpath ) and self .cfg .get ('install_cmd' , None ) is None :
5454 copy (srcpath , self .installdir )
5555 else :
56- if os .path .isdir (src ):
56+ if os .path .isdir (srcpath ):
5757 self .cfg ['start_dir' ] = src
58- elif os .path .isfile (src ):
58+ elif os .path .isfile (srcpath ):
5959 self .cfg ['start_dir' ] = self .builddir
6060 else :
6161 raise EasyBuildError ("Path %s is not a file nor a directory?" , srcpath )
0 commit comments