mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-22 07:19:02 +00:00
Updated pyinstaller spec file to support windows builds
This commit is contained in:
parent
2cc270bab0
commit
b57db079d0
1 changed files with 15 additions and 5 deletions
|
@ -3,17 +3,27 @@
|
||||||
|
|
||||||
import os, sys
|
import os, sys
|
||||||
|
|
||||||
basepath = '/vagrant/borg/borg'
|
is_win32 = sys.platform.startswith('win32')
|
||||||
|
|
||||||
|
# Note: SPEC contains the spec file argument given to pyinstaller
|
||||||
|
here = os.path.dirname(os.path.abspath(SPEC))
|
||||||
|
|
||||||
|
if is_win32:
|
||||||
|
basepath = os.path.abspath(os.path.join(here, '..'))
|
||||||
|
hiddenimports = []
|
||||||
|
else:
|
||||||
|
basepath = '/vagrant/borg/borg'
|
||||||
|
hiddenimports = ['borg.platform.posix']
|
||||||
|
|
||||||
block_cipher = None
|
block_cipher = None
|
||||||
|
|
||||||
a = Analysis([os.path.join(basepath, 'src/borg/__main__.py'), ],
|
a = Analysis([os.path.join(basepath, 'src', 'borg', '__main__.py'), ],
|
||||||
pathex=[basepath, ],
|
pathex=[basepath, ],
|
||||||
binaries=[],
|
binaries=[],
|
||||||
datas=[
|
datas=[
|
||||||
('../src/borg/paperkey.html', 'borg'),
|
(os.path.join(basepath, 'src', 'borg', 'paperkey.html'), 'borg'),
|
||||||
],
|
],
|
||||||
hiddenimports=['borg.platform.posix'],
|
hiddenimports=hiddenimports,
|
||||||
hookspath=[],
|
hookspath=[],
|
||||||
runtime_hooks=[],
|
runtime_hooks=[],
|
||||||
excludes=[
|
excludes=[
|
||||||
|
@ -39,7 +49,7 @@ exe = EXE(pyz,
|
||||||
debug=False,
|
debug=False,
|
||||||
strip=False,
|
strip=False,
|
||||||
upx=True,
|
upx=True,
|
||||||
console=True )
|
console=True)
|
||||||
|
|
||||||
if False:
|
if False:
|
||||||
# Enable this block to build a directory-based binary instead of
|
# Enable this block to build a directory-based binary instead of
|
||||||
|
|
Loading…
Reference in a new issue