[New-bugs-announce] [issue31072] add filter to zipapp

Irmen de Jong report at bugs.python.org
Fri Jul 28 12:50:52 EDT 2017


New submission from Irmen de Jong:

As briefly discussed on comp.lang.python, I propose to add an optional filter callback function to zipapp.create_archive.


The function could perhaps work like the os.walk generator or maybe just lets you to return a simple boolean for every folder/file that it wants to include in the zip.

My use case is that I sometimes don't want to include every file in the root folder into the zip file (I want to be able to skip temporary or irrelevant folders such as .git/.svn, .tox, .tmp and sometimes want to avoid including *.pyc/*.pyo files).  Right now, I first have to manually clean up the folder before I can use zipapp.create_archive.


(Instead of providing a filter callback fuction, another approach may be to provide your own dir/file generator instead, that fully replaces the internal file listing logic of zipapp.create_archive?)

----------
assignee: paul.moore
components: Library (Lib)
keywords: easy
messages: 299409
nosy: irmen, paul.moore
priority: normal
severity: normal
status: open
title: add filter to zipapp
type: enhancement

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31072>
_______________________________________


More information about the New-bugs-announce mailing list