forked from pyinstaller/pyinstaller
/
test_multipackage5.spec
90 lines (79 loc) · 2.67 KB
/
test_multipackage5.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
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
# -*- mode: python -*-
#-----------------------------------------------------------------------------
# Copyright (c) 2013-2021, PyInstaller Development Team.
#
# Distributed under the terms of the GNU General Public License (version 2
# or later) with exception for distributing the bootloader.
#
# The full license is in the file COPYING.txt, distributed with this software.
#
# SPDX-License-Identifier: (GPL-2.0-or-later WITH Bootloader-exception)
#-----------------------------------------------------------------------------
# TESTING MULTIPROCESS FEATURE: file A (onedir pack) depends on file B (onedir pack)
# and file C (onefile pack)
import os
import sys
SCRIPT_DIR = 'multipackage-scripts'
__testname__ = 'test_multipackage5'
__testdep__ = 'multipackage5_B'
__testdep2__ = 'multipackage5_C'
a = Analysis([os.path.join(SCRIPT_DIR, __testname__ + '.py')],
hookspath=[os.path.join(SPECPATH, SCRIPT_DIR, 'extra-hooks')],
pathex=['.'])
b = Analysis([os.path.join(SCRIPT_DIR, __testdep__ + '.py')],
hookspath=[os.path.join(SPECPATH, SCRIPT_DIR, 'extra-hooks')],
pathex=['.'])
c = Analysis([os.path.join(SCRIPT_DIR, __testdep2__ + '.py')],
hookspath=[os.path.join(SPECPATH, SCRIPT_DIR, 'extra-hooks')],
pathex=['.'])
MERGE((b, __testdep__, os.path.join(__testdep__, __testdep__)),
(c, __testdep2__, os.path.join(__testdep2__)),
(a, __testname__, os.path.join(__testname__, __testname__)))
pyz = PYZ(a.pure)
exe = EXE(pyz,
a.scripts,
a.dependencies,
exclude_binaries=1,
name=os.path.join('build', 'pyi.'+sys.platform, __testname__,
__testname__),
debug=True,
strip=False,
upx=True,
console=1 )
coll = COLLECT( exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name=os.path.join('dist', __testname__))
pyzB = PYZ(b.pure)
exeB = EXE(pyzB,
b.scripts,
b.dependencies,
exclude_binaries=1,
name=os.path.join('build', 'pyi.'+sys.platform, __testdep__,
__testdep__),
debug=True,
strip=False,
upx=True,
console=1 )
coll = COLLECT( exeB,
b.binaries,
b.zipfiles,
b.datas,
strip=False,
upx=True,
name=os.path.join('dist', __testdep__))
pyzC = PYZ(c.pure)
exeC = EXE(pyzC,
c.scripts,
c.binaries,
c.zipfiles,
c.datas,
c.dependencies,
name=os.path.join('dist', __testdep2__),
debug=True,
strip=False,
upx=True,
console=1 )