Skip to content
This repository has been archived by the owner on Oct 3, 2022. It is now read-only.

Commit

Permalink
Includes ensurepip and venv packages in nuget package.
Browse files Browse the repository at this point in the history
  • Loading branch information
zooba committed Feb 6, 2017
2 parents eb2b685 + a0586fe commit c72a15e
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Tools/msi/make_zip.py
Expand Up @@ -29,12 +29,15 @@

EXCLUDE_FROM_LIBRARY = {
'__pycache__',
'ensurepip',
'idlelib',
'pydoc_data',
'site-packages',
'tkinter',
'turtledemo',
}

EXCLUDE_FROM_EMBEDDABLE_LIBRARY = {
'ensurepip',
'venv',
}

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

def include_in_embeddable_lib(p):
if p.is_dir() and p.name.lower() in EXCLUDE_FROM_EMBEDDABLE_LIBRARY:
return False

return include_in_lib(p)

def include_in_libs(p):
if not is_not_debug(p):
return False
Expand Down Expand Up @@ -114,7 +123,7 @@ def include_in_tools(p):
('/', 'PCBuild/$arch', 'python*.exe', is_not_debug),
('/', 'PCBuild/$arch', '*.pyd', is_not_debug),
('/', 'PCBuild/$arch', '*.dll', is_not_debug),
('{}.zip'.format(BASE_NAME), 'Lib', '**/*', include_in_lib),
('{}.zip'.format(BASE_NAME), 'Lib', '**/*', include_in_embeddable_lib),
]

if os.getenv('DOC_FILENAME'):
Expand Down

0 comments on commit c72a15e

Please sign in to comment.