Pārlūkot izejas kodu

pyinstaller: compute basepath from spec file location

so it does not just run on the vagrant machine, but also everywhere else.
Thomas Waldmann 4 gadi atpakaļ
vecāks
revīzija
b1f8037ef4
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      scripts/borg.exe.spec

+ 3 - 1
scripts/borg.exe.spec

@@ -3,7 +3,9 @@
 
 import os, sys
 
-basepath = '/vagrant/borg/borg'
+# 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, '..'))
 
 block_cipher = None