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 <rep...@bugs.python.org>
<http://bugs.python.org/issue31072>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to