@@ -109,7 +109,7 @@ def replace_in_nsis_file(fname, data):
109109
110110def build_nsis (srcname , dstname , data ):
111111 """Build NSIS script"""
112- portable_dir = osp .join (osp .dirname (__file__ ), 'portable' )
112+ portable_dir = osp .join (osp .dirname (osp . abspath ( __file__ ) ), 'portable' )
113113 shutil .copy (osp .join (portable_dir , srcname ), dstname )
114114 data = [('!addincludedir' , osp .join (portable_dir , 'include' ))
115115 ] + list (data )
@@ -266,7 +266,7 @@ def postpath(self):
266266 @property
267267 def toolsdirs (self ):
268268 """Return tools directory list"""
269- return [osp .join (osp .dirname (__file__ ), 'tools' )] + self ._toolsdirs
269+ return [osp .join (osp .dirname (osp . abspath ( __file__ ) ), 'tools' )] + self ._toolsdirs
270270
271271 def get_package_fname (self , pattern ):
272272 """Get package matching pattern in instdirs"""
@@ -305,7 +305,7 @@ def create_launcher(self, name, icon, command=None,
305305 args = None , workdir = None , settingspath = None ):
306306 """Create exe launcher with NSIS"""
307307 assert name .endswith ('.exe' )
308- portable_dir = osp .join (osp .dirname (__file__ ), 'portable' )
308+ portable_dir = osp .join (osp .dirname (osp . abspath ( __file__ ) ), 'portable' )
309309 icon_fname = osp .join (portable_dir , 'icons' , icon )
310310 assert osp .isfile (icon_fname )
311311
@@ -368,7 +368,7 @@ def create_python_batch(self, name, script_name,
368368 def create_installer (self ):
369369 """Create installer with NSIS"""
370370 self ._print ("Creating WinPython installer" )
371- portable_dir = osp .join (osp .dirname (__file__ ), 'portable' )
371+ portable_dir = osp .join (osp .dirname (osp . abspath ( __file__ ) ), 'portable' )
372372 fname = osp .join (portable_dir , 'installer-tmp.nsi' )
373373 data = (('DISTDIR' , self .winpydir ),
374374 ('ARCH' , self .winpy_arch ),
@@ -928,7 +928,7 @@ def rebuild_winpython(basedir=None, verbose=False, archis=(32, 64)):
928928 for name in os .listdir (packdir ):
929929 if name .startswith ('winpython-' ) and name .endswith ('.exe' ):
930930 os .remove (osp .join (packdir , name ))
931- utils .build_wininst (osp .dirname (__file__ ), copy_to = packdir ,
931+ utils .build_wininst (osp .dirname (osp . abspath ( __file__ ) ), copy_to = packdir ,
932932 architecture = architecture , verbose = verbose )
933933
934934
0 commit comments