-
Notifications
You must be signed in to change notification settings - Fork 1
/
spcal.spec
36 lines (32 loc) · 874 Bytes
/
spcal.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
# 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("spcal", "__main__.py")],
datas=[
("spcal/resources/app.ico", "spcal/resources"),
("spcal/resources/npdb.npz", "spcal/resources"),
],
hiddenimports=["bottleneck"],
)
pyz = PYZ(a.pure)
name = f"spcal_{importlib.metadata.version('spcal')}"
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="app.ico",
)