Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b4c63d

Browse files
committed
Makes embedded distribution a plain ZIP file and corrects pyd exclusion.
1 parent 19694ab commit 6b4c63d

2 files changed

Lines changed: 16 additions & 12 deletions

File tree

Tools/msi/make_zip.proj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
<Import Project="msi.props" />
1010

1111
<PropertyGroup>
12+
<SignOutput>false</SignOutput>
1213
<TargetName>python-$(PythonVersion)-embed-$(ArchName)</TargetName>
13-
<TargetExt>.exe</TargetExt>
14+
<TargetExt>.zip</TargetExt>
1415
<TargetPath>$(OutputPath)\en-us\$(TargetName)$(TargetExt)</TargetPath>
1516
<Arguments>"$(PythonExe)" "$(MSBuildThisFileDirectory)\make_zip.py"</Arguments>
1617
<Arguments>$(Arguments) -e -o "$(TargetPath)" -t "$(IntermediateOutputPath)\zip_$(ArchName)" -a $(ArchName)</Arguments>

Tools/msi/make_zip.py

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,19 @@
1414
PYTHON_DLL_RE = re.compile(r'python\d\d?\.dll$', re.IGNORECASE)
1515

1616
def is_not_debug(p):
17-
return not DEBUG_RE.search(p.name) and not TKTCL_RE.search(p.name)
17+
if DEBUG_RE.search(p.name):
18+
return False
19+
20+
if TKTCL_RE.search(p.name):
21+
return False
22+
23+
return p.name.lower() not in {
24+
'_ctypes_test.pyd',
25+
'_testbuffer.pyd',
26+
'_testcapi.pyd',
27+
'_testimportmultiple.pyd',
28+
'xxlimited.pyd',
29+
}
1830

1931
def is_not_debug_or_python(p):
2032
return is_not_debug(p) and not PYTHON_DLL_RE.search(p.name)
@@ -31,14 +43,6 @@ def include_in_lib(p):
3143
return True
3244

3345
suffix = p.suffix.lower()
34-
if suffix == '.pyd':
35-
return name not in {
36-
'_ctypes_test.pyd',
37-
'_testbuffer.pyd',
38-
'_testcapi.pyd',
39-
'_testimportmultiple.pyd',
40-
'xxlimited.pyd',
41-
}
4246
return suffix not in {'.pyc', '.pyo'}
4347

4448
def include_in_tools(p):
@@ -153,8 +157,7 @@ def main():
153157
subprocess.check_call([
154158
str(rar),
155159
"a",
156-
"-m5", "-ed", "-ep1", "-s", "-r",
157-
"-sfxwincon.sfx",
160+
"-ed", "-ep1", "-s", "-r",
158161
str(out),
159162
str(temp / '*')
160163
])

0 commit comments

Comments
 (0)