-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdget.spec
More file actions
34 lines (30 loc) · 821 Bytes
/
dget.spec
File metadata and controls
34 lines (30 loc) · 821 Bytes
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
# vim: set ft=python:
import argparse
import importlib.metadata
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument("--debug", action="store_true")
opts = parser.parse_args()
a = Analysis(
[Path("src/dget/gui", "__main__.py")],
datas=[
("src/dget/gui/resources/app.ico", "dget/gui/resources"),
],
)
pyz = PYZ(a.pure)
name = f"dget_{importlib.metadata.version('dget')}"
if opts.debug:
exe = EXE(pyz, a.scripts, exclude_binaries=True, name=name)
coll = COLLECT(exe, a.binaries, a.datas, name=name + "_debug")
else:
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
name=name,
debug=False,
upx_exclude=["Qt*.dll", "PySide*.pyd"],
console=False,
icon="src/dget/gui/resources/app.ico",
)