-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdenonremote.spec
65 lines (57 loc) · 1.71 KB
/
denonremote.spec
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
# This Python file uses the following encoding: utf-8
#
# SPDX-FileCopyrightText: 2021-2022 Raphaël Doursenaud <rdoursenaud@free.fr>
#
# SPDX-License-Identifier: GPL-3.0-or-later
from PyInstaller.building.api import EXE, PYZ
from PyInstaller.building.build_main import Analysis
from PyInstaller.building.datastruct import Tree
from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal, hookspath, runtime_hooks
from kivy_deps import glew, sdl2
from denonremote.__about__ import __version__
block_cipher = None
added_files = [
('src/denonremote/fonts', 'fonts'),
('src/denonremote/images', 'images'),
('src/denonremote/settings', 'settings'),
('src/denonremote/denonremote.kv', 'denonremote'),
]
# Minimize dependencies bundling
dependencies = get_deps_minimal(exclude_ignored=False, window=True, text=True, image=True)
# Fixes ModuleNotFoundError: No module named 'twisted'
dependencies['hiddenimports'].append('twisted.internet._threadedselect')
dependencies['excludes'].remove('twisted')
a = Analysis(
cipher=block_cipher,
datas=added_files,
hookspath=hookspath(),
noarchive=False,
runtime_hooks=runtime_hooks(),
scripts=['src/denonremote/__main__.py'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
**dependencies,
)
pyz = PYZ(
a.pure,
a.zipped_data,
cipher=block_cipher,
)
exe = EXE(
pyz,
Tree('src/denonremote'),
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
bootloader_ignore_signals=False,
console=False,
debug=False,
icon='icon.ico',
name=f'denonremote-v{__version__}',
runtime_tmpdir=None,
strip=False,
upx=True,
upx_exclude=[],
*[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)],
)