Skip to content

Commit 613a7b4

Browse files
committed
changed osp.dirname() to osp.dirname(osp.abspath())
1 parent 39a5cb4 commit 613a7b4

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

make.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def replace_in_nsis_file(fname, data):
109109

110110
def 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)
@@ -263,7 +263,7 @@ def postpath(self):
263263
@property
264264
def toolsdirs(self):
265265
"""Return tools directory list"""
266-
return [osp.join(osp.dirname(__file__), 'tools')] + self._toolsdirs
266+
return [osp.join(osp.dirname(osp.abspath(__file__)), 'tools')] + self._toolsdirs
267267

268268
def get_package_fname(self, pattern):
269269
"""Get package matching pattern in instdir"""
@@ -302,7 +302,7 @@ def create_launcher(self, name, icon, command=None,
302302
args=None, workdir=None, settingspath=None):
303303
"""Create exe launcher with NSIS"""
304304
assert name.endswith('.exe')
305-
portable_dir = osp.join(osp.dirname(__file__), 'portable')
305+
portable_dir = osp.join(osp.dirname(osp.abspath(__file__)), 'portable')
306306
icon_fname = osp.join(portable_dir, 'icons', icon)
307307
assert osp.isfile(icon_fname)
308308

@@ -365,7 +365,7 @@ def create_python_batch(self, name, script_name,
365365
def create_installer(self):
366366
"""Create installer with NSIS"""
367367
self._print("Creating WinPython installer")
368-
portable_dir = osp.join(osp.dirname(__file__), 'portable')
368+
portable_dir = osp.join(osp.dirname(osp.abspath(__file__)), 'portable')
369369
fname = osp.join(portable_dir, 'installer-tmp.nsi')
370370
data = (('DISTDIR', self.winpydir),
371371
('ARCH', self.winpy_arch),
@@ -867,7 +867,7 @@ def rebuild_winpython(basedir=None, verbose=False, archis=(32, 64)):
867867
for name in os.listdir(packdir):
868868
if name.startswith('winpython-') and name.endswith('.exe'):
869869
os.remove(osp.join(packdir, name))
870-
utils.build_wininst(osp.dirname(__file__), copy_to=packdir,
870+
utils.build_wininst(osp.dirname(osp.abspath(__file__)), copy_to=packdir,
871871
architecture=architecture, verbose=verbose)
872872

873873

0 commit comments

Comments
 (0)