File: borg.exe.spec

package info (click to toggle)
borgbackup 1.4.2-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,532 kB
  • sloc: python: 26,544; pascal: 3,245; ansic: 2,597; sh: 150; makefile: 133; tcl: 94
file content (74 lines) | stat: -rw-r--r-- 2,278 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# -*- mode: python -*-
# This PyInstaller spec file is used to build Borg binaries on POSIX platforms.

import os, sys

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:
    hiddenimports = []
else:
    hiddenimports = ['borg.platform.posix', ]

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=hiddenimports,
             hookspath=[],
             runtime_hooks=[],
             excludes=[
                '_ssl', 'ssl',
                'pkg_resources',  # avoid pkg_resources related warnings
             ],
             win_no_prefer_redirects=False,
             win_private_assemblies=False,
             cipher=block_cipher)

if sys.platform == 'darwin':
    # Do not bundle the macFUSE libraries to avoid a version
    # mismatch with the installed macFUSE kernel driver.
    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)

# Build a directory-based binary in addition to a packed
# single file. This allows one to easily look at all included
# files (e.g., without having to strace or halt the built binary
# and introspect /tmp). Also avoids unpacking all libraries when
# running the app, which is better for app signing on various operating systems.
slim_exe = EXE(pyz,
            a.scripts,
            exclude_binaries=True,
            name='borg.exe',
            debug=False,
            strip=False,
            upx=False,
            console=True)

coll = COLLECT(slim_exe,
                a.binaries,
                a.zipfiles,
                a.datas,
                strip=False,
                upx=False,
                name='borg-dir')