-
Notifications
You must be signed in to change notification settings - Fork 52
/
Copy pathrdmc-pyinstaller-windows.spec
63 lines (52 loc) · 1.65 KB
/
rdmc-pyinstaller-windows.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
###
# Copyright Notice:
# Copyright 2016 Distributed Management Task Force, Inc. All rights reserved.
# License: BSD 3-Clause License. For full text see link: https://github.com/DMTF/python-redfish-utility/blob/main/LICENSE.md
###
# -*- mode: python -*-
import os
block_cipher = None
def hiddenImportGet():
tl = []
classNames = []
_Commands = {}
extensionDir = os.path.dirname(os.getcwd()+ '\\src')
if os.name != 'nt':
replacement = '/'
else:
replacement = '\\'
for (cwd, dirs, filenames) in os.walk(extensionDir):
dirs[:] = [d for d in dirs if not d[0] == '.']
tl.append((cwd,[files for files in filenames if not files[0] == '.']))
for cwd, names in tl:
cn = cwd.split('extensions')[-1]
cn = cn.replace(replacement, '.')
for name in names:
if '.pyc' not in name and '__init__' not in name:
name = name.replace('.py', '')
classNames.append('extensions'+cn+'.'+name)
return classNames
a = Analysis(['.\\src\\rdmc.py'],
pathex=['.\\src'],
binaries=None,
datas=[('.\\src\\extensions', 'extensions')],
hiddenimports=hiddenImportGet(),
hookspath=[],
runtime_hooks=[],
excludes=[],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='redfish',
debug=False,
strip=False,
upx=True,
icon = '',
console=True )