1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2024-12-24 08:45:34 +00:00
vorta/package/borg.spec
Manu 82844a17b4
Add macOS notarization, use Github Workflows for testing (#407)
* Improve macOS packaging, add notarization.
* Properly use QApplication while testing, remove workarounds.
* Use Github Workflows instead of Travis.
* Remove outdated test workaround.
2020-03-03 13:19:36 +08:00

53 lines
1.5 KiB
Python

# -*- mode: python -*-
# this pyinstaller spec file is used to build borg binaries on posix platforms
# adapted from Borg project to package noatrized folder-style app
import os, sys
## Pass borg source dir as last argument
basepath = os.path.abspath(os.path.join(sys.argv[-1]))
block_cipher = None
a = Analysis([os.path.join(basepath, 'src', 'borg', '__main__.py'), ],
pathex=[basepath, ],
binaries=[],
datas=[
(os.path.join(basepath, 'src', 'borg', 'paperkey.html'), 'borg'),
],
hiddenimports=[
'borg.platform.posix',
'borg.platform.darwin',
],
hookspath=[],
runtime_hooks=[],
excludes=[
'_ssl', 'ssl',
],
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,
exclude_binaries=True,
name='borg.exe',
debug=False,
strip=False,
upx=False,
console=True)
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=False,
name='borg-dir')