Message299409
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?) |
|
| Date |
User |
Action |
Args |
| 2017-07-28 16:50:52 | irmen | set | recipients:
+ irmen, paul.moore |
| 2017-07-28 16:50:52 | irmen | set | messageid: <[email protected]> |
| 2017-07-28 16:50:51 | irmen | link | issue31072 messages |
| 2017-07-28 16:50:51 | irmen | create | |
|