2016-10-01 22:43:06 +00:00
|
|
|
# -*- mode: python -*-
|
|
|
|
# this pyinstaller spec file is used to build borg binaries on posix platforms
|
|
|
|
|
|
|
|
import os, sys
|
|
|
|
|
|
|
|
basepath = '/vagrant/borg/borg'
|
|
|
|
|
|
|
|
block_cipher = None
|
|
|
|
|
2016-10-13 17:10:04 +00:00
|
|
|
a = Analysis([os.path.join(basepath, 'src/borg/__main__.py'), ],
|
2016-10-01 22:43:06 +00:00
|
|
|
pathex=[basepath, ],
|
|
|
|
binaries=[],
|
2017-02-12 23:37:27 +00:00
|
|
|
datas=[
|
|
|
|
('../src/borg/paperkey.html', 'borg'),
|
|
|
|
],
|
2016-10-01 22:43:06 +00:00
|
|
|
hiddenimports=['borg.platform.posix'],
|
|
|
|
hookspath=[],
|
|
|
|
runtime_hooks=[],
|
2017-06-02 10:52:30 +00:00
|
|
|
excludes=[
|
|
|
|
'_ssl', 'ssl',
|
|
|
|
],
|
2016-10-01 22:43:06 +00:00
|
|
|
win_no_prefer_redirects=False,
|
|
|
|
win_private_assemblies=False,
|
|
|
|
cipher=block_cipher)
|
|
|
|
|
|
|
|
if sys.platform == 'darwin':
|
|
|
|
# do not bundle the osxfuse libraries, so we do not get a version
|
|
|
|
# mismatch to the installed kernel driver of osxfuse.
|
|
|
|
a.binaries = [b for b in a.binaries if 'libosxfuse' not in b[0]]
|
|
|
|
|
|
|
|
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
|
|
|
|
|
|
|
|
exe = EXE(pyz,
|
|
|
|
a.scripts,
|
|
|
|
a.binaries,
|
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
name='borg.exe',
|
|
|
|
debug=False,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
|
|
|
console=True )
|
2017-06-02 10:52:30 +00:00
|
|
|
|
|
|
|
if False:
|
|
|
|
# Enable this block to build a directory-based binary instead of
|
2018-01-03 10:42:12 +00:00
|
|
|
# a packed single file. This allows one to easily look at all included
|
2017-06-02 10:52:30 +00:00
|
|
|
# files (e.g. without having to strace or halt the built binary
|
|
|
|
# and introspect /tmp).
|
|
|
|
coll = COLLECT(exe,
|
|
|
|
a.binaries,
|
|
|
|
a.zipfiles,
|
|
|
|
a.datas,
|
|
|
|
strip=False,
|
|
|
|
upx=True,
|
|
|
|
name='borg-dir')
|