-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuckling.spec
More file actions
79 lines (68 loc) · 1.99 KB
/
buckling.spec
File metadata and controls
79 lines (68 loc) · 1.99 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
# -*- mode: python ; coding: utf-8 -*-
# the following code sets the metadata "Properties" on the file
import subprocess
def get_git_revision_short_hash() -> str:
return subprocess.check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('ascii').strip()
with open('version_template.rc', 'r') as file:
file_content = file.read()
# Replace the old string with the new one
modified_content = file_content.replace('VERSION', get_git_revision_short_hash())
# Write the modified content back to the file
with open('version.rc', 'w') as file:
file.write(modified_content)
##### include mydir in distribution #######
def extra_datas(mydir):
def rec_glob(p, files):
import os
import glob
for d in glob.glob(p):
if os.path.isfile(d):
files.append(d)
rec_glob("%s/*" % d, files)
files = []
rec_glob("%s/*" % mydir, files)
extra_datas = []
for f in files:
extra_datas.append((f, f, 'DATA'))
print(f)
return extra_datas
###########################################
a = Analysis(
['src/app_async3_login.py'],
pathex=[],
binaries=[],
datas=[('src/universal_file.py', '.'),
('src/helper_classes.py', '.'),
('src/authentication.py', '.'),
('src/ansys_helper_functions.py', '.'),
('src/nastran.py', '.'),
('src/buckling_input_pb2.py', '.'),
('src/buckling_result_pb2.py', '.')],
hiddenimports=['jwt', 'keyring', 'pydantic'],
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
noarchive=False,
)
pyz = PYZ(a.pure)
exe = EXE(
pyz,
a.scripts,
a.binaries,
a.datas,
[],
name='buckling',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
console=True,
disable_windowed_traceback=False,
argv_emulation=False,
target_arch=None,
codesign_identity=None,
entitlements_file=None,
)