Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathmake-msi.py
More file actions
Latest commit
40 lines (34 loc) · 958 Bytes
/
Copy pathmake-msi.py
File metadata and controls
40 lines (34 loc) · 958 Bytes
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
fromsubprocessimportcheck_callasrun
from_make_helperimport (
get_dirs,
get_msbuild,
get_msix_version,
get_output_name,
)
MSBUILD_CMD=get_msbuild()
DIRS=get_dirs()
BUILD=DIRS["build"]
TEMP=DIRS["temp"]
LAYOUT=DIRS["out"]
SRC=DIRS["src"]
DIST=DIRS["dist"]
# Calculate output names (must be after building)
NAME=get_output_name(DIRS)
VERSION=get_msix_version(DIRS)
# Package into MSI
pydllname= [p.stemforpin (LAYOUT/"runtime").glob("python*.dll")][0]
pydsuffix= [p.name.partition(".")[-1] forpin (LAYOUT/"runtime").glob("manage*.pyd")][0]
run([
*MSBUILD_CMD,
"-Restore",
SRC/"pymanager/msi.wixproj",
"/p:Platform=x64",
"/p:Configuration=Release",
f"/p:OutputPath={DIST}",
f"/p:IntermediateOutputPath={TEMP}\\",
f"/p:TargetName={NAME}",
f"/p:Version={VERSION}",
f"/p:PythonDLLName={pydllname}",
f"/p:PydSuffix={pydsuffix}",
f"/p:LayoutDir={LAYOUT}",
])