File: rednotebook.spec

package info (click to toggle)
rednotebook 2.39%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 5,956 kB
  • sloc: python: 9,570; javascript: 4,103; xml: 128; sh: 58; makefile: 11
file content (76 lines) | stat: -rw-r--r-- 1,817 bytes parent folder | download | duplicates (3)
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
75
76
# -*- mode: python -*-

import os
import os.path

block_cipher = None
debug = False

drive_c = DISTPATH
basedir = os.path.join(drive_c, 'repo')
gtkdir = os.path.join(drive_c, 'gtk')
srcdir = os.path.join(basedir, 'rednotebook')
icon = os.path.join(basedir, 'win', 'rednotebook.ico')

MISSED_BINARIES = [
    (os.path.join(gtkdir, src), destdir) for src, destdir in [
        ("bin/gdbus.exe", "."),
        ("bin/libenchant.dll", "."),
        ("lib/enchant/libenchant_myspell.dll", "lib/enchant/"),
    ]
]

for path in [drive_c, basedir, srcdir, icon] + [src for src, _ in MISSED_BINARIES]:
    assert os.path.exists(path), "{} does not exist".format(path)

print('PATH:', os.environ['PATH'])


def Dir(path, excludes=None):
    assert os.path.isdir(path), path
    return Tree(path, prefix=os.path.basename(path), excludes=excludes or [])

a = Analysis(
    [os.path.join(srcdir, 'journal.py')],
    pathex=[basedir],
    binaries=MISSED_BINARIES,
    datas=[],
    hiddenimports=[],
    hookspath=["."],  # To find custom hooks.
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
)
pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)
exe = EXE(
    pyz,
    a.scripts,
    exclude_binaries=True,
    name='rednotebook.exe',
    debug=debug,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    console=debug,
    disable_windowed_traceback=False,
    argv_emulation=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None,
    icon=icon,
)
coll = COLLECT(
    exe,
    a.binaries,
    a.zipfiles,
    a.datas,
    Dir(os.path.join(srcdir, 'files')),
    Dir(os.path.join(srcdir, 'images')),
    strip=False,
    upx=True,
    upx_exclude=[],
    name='dist',
)