-
Notifications
You must be signed in to change notification settings - Fork 52
/
rdmc-pyinstaller-mac.spec
56 lines (46 loc) · 1.4 KB
/
rdmc-pyinstaller-mac.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
###
# 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')
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=[],
binaries=None,
datas=[('.//src//extensions', 'extensions')],
hiddenimports=hiddenImportGet(),
hookspath=[],
runtime_hooks=[],
excludes=[],
cipher=block_cipher)
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='redfish',
debug=False,
strip=None,
upx=True,
icon='',
console=True )