-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathopen-numismat-portable.spec
More file actions
104 lines (96 loc) · 2.04 KB
/
open-numismat-portable.spec
File metadata and controls
104 lines (96 loc) · 2.04 KB
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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# -*- mode: python ; coding: utf-8 -*-
include_files = [
("COPYING", "."),
("OpenNumismat/templates", "templates"),
("OpenNumismat/db", "db"),
]
a = Analysis(
["open-numismat.py"],
pathex=[],
binaries=[],
datas=include_files,
hiddenimports=[],
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=None,
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
[],
exclude_binaries=True,
name="OpenNumismat",
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=False,
icon="icons/main.ico",
version="versionfile.txt",
)
coll = COLLECT(
exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
upx_exclude=[],
name="OpenNumismat",
)
import os
import shutil
import sys
WIN32 = sys.platform == "win32"
DARWIN = sys.platform == "darwin"
if WIN32:
bin_dir = "dist/OpenNumismat/_internal/"
pyd_ext = ".pyd"
else:
bin_dir = "dist/OpenNumismat.app/Contents/Frameworks/"
pyd_ext = ".abi3.so"
for sub_folder in ("qml",):
if WIN32:
shutil.rmtree(bin_dir + "PySide6/" + sub_folder)
else:
shutil.rmtree(bin_dir + "PySide6/Qt/" + sub_folder)
for f in (
"QtPositioning",
"QtQml",
"QtQuick",
"QtQuickWidgets",
):
try:
os.remove(bin_dir + "PySide6/" + f + pyd_ext)
except OSError:
print("Missed file:", "PySide6/" + f + pyd_ext)
pass
if WIN32:
pass
else:
for f in (
"QtBluetooth",
"QtDesigner",
"QtLocation",
"QtMultimedia",
"QtMultimediaWidgets",
"QtNfc",
"QtQuickParticles",
"QtQuickTemplates2",
"QtQmlWorkerScript",
"QtQuick3D",
"QtQuick3DAssetImport",
"QtQuick3DRender",
"QtQuick3DRuntimeRender",
"QtQuick3DUtils",
):
try:
os.remove(bin_dir + f)
except OSError:
print("Missed file:", f)
pass