瀏覽代碼

pyinstaller: compute basepath from spec file location

so it does not just run on the vagrant machine, but also everywhere else.
Thomas Waldmann 4 年之前
父節點
當前提交
7ee2dca547
共有 1 個文件被更改,包括 1 次插入2 次删除
  1. 1 2
      scripts/borg.exe.spec

+ 1 - 2
scripts/borg.exe.spec

@@ -7,12 +7,11 @@ is_win32 = sys.platform.startswith('win32')
 
 # Note: SPEC contains the spec file argument given to pyinstaller
 here = os.path.dirname(os.path.abspath(SPEC))
+basepath = os.path.abspath(os.path.join(here, '..'))
 
 if is_win32:
-    basepath = os.path.abspath(os.path.join(here, '..'))
     hiddenimports = []
 else:
-    basepath = '/vagrant/borg/borg'
     hiddenimports = ['borg.platform.posix', 'pkg_resources.py2_warn', ]
 
 block_cipher = None