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

Skip to content

Commit d947e4d

Browse files
committed
Includes ensurepip and venv packages in nuget package.
2 parents 0fa4746 + f007b49 commit d947e4d

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

Tools/msi/make_zip.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,15 @@
2929

3030
EXCLUDE_FROM_LIBRARY = {
3131
'__pycache__',
32-
'ensurepip',
3332
'idlelib',
3433
'pydoc_data',
3534
'site-packages',
3635
'tkinter',
3736
'turtledemo',
37+
}
38+
39+
EXCLUDE_FROM_EMBEDDABLE_LIBRARY = {
40+
'ensurepip',
3841
'venv',
3942
}
4043

@@ -82,6 +85,12 @@ def include_in_lib(p):
8285
suffix = p.suffix.lower()
8386
return suffix not in {'.pyc', '.pyo', '.exe'}
8487

88+
def include_in_embeddable_lib(p):
89+
if p.is_dir() and p.name.lower() in EXCLUDE_FROM_EMBEDDABLE_LIBRARY:
90+
return False
91+
92+
return include_in_lib(p)
93+
8594
def include_in_libs(p):
8695
if not is_not_debug(p):
8796
return False
@@ -114,7 +123,7 @@ def include_in_tools(p):
114123
('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
115124
('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
116125
('/', 'PCBuild/$arch', '*.dll', is_not_debug),
117-
('{}.zip'.format(BASE_NAME), 'Lib', '**/*', include_in_lib),
126+
('{}.zip'.format(BASE_NAME), 'Lib', '**/*', include_in_embeddable_lib),
118127
]
119128

120129
if os.getenv('DOC_FILENAME'):

0 commit comments

Comments
 (0)