-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathmockpy.spec
57 lines (46 loc) · 1.24 KB
/
mockpy.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
# -*- mode: python -*-
import site
import os
block_cipher = None
def check_path_exists(path):
if not os.path.exists(path):
print("Required path `%s` missing" % path)
exit(0)
a = Analysis(['mockpy.py'],
pathex=['/Users/omarsubhiabdelhafith/Documents/Python/mockpy/mockpy'],
hiddenimports=[],
hookspath=None,
runtime_hooks=None,
excludes=None,
cipher=block_cipher)
a.datas += [("sample.yml", "mockpy/data/sample.yml", "DATA" )]
path = site.getsitepackages()[0] + "/cryptography/hazmat/bindings/openssl/src"
check_path_exists(path)
a.datas += Tree(
path,
prefix = "cryptography/hazmat/bindings/openssl/src"
)
path = "../mitmproxy/libmproxy/onboarding/templates"
check_path_exists(path)
a.datas += Tree(
path,
prefix="libmproxy/onboarding/templates"
)
path = "../mitmproxy/libmproxy/onboarding/static"
check_path_exists(path)
a.datas += Tree(
path,
prefix="libmproxy/onboarding/static"
)
pyz = PYZ(a.pure,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
name='mockpy',
debug=False,
strip=None,
upx=True,
console=True )