zippapp/ macOS: .DS_Store files should be excluded from the generated archives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 77.2k
- Forks
- 35.9k
- PR merge metrics
- PR metrics pending
Description
Bug report
Bug description:
When generating a zipapp under macOS then random ".DS_Store" files get included into the generated archive.
e.g.
$ python3.12 -m zipapp --output cfv.pyz --compress --python /usr/local/bin/python3 zipapptempdir
$ unzip -l cfv.pyz
Archive: cfv.pyz
Length Date Time Name
--------- ---------- ----- ----
6148 04-13-2024 00:17 .DS_Store
186 04-13-2024 00:20 __main__.py
0 04-13-2024 00:17 cfv/
6148 04-13-2024 00:17 cfv/.DS_Store
…
--------- -------
137783 20 files
Those files quickly get regenerated by Finder, so it's hard to entirely avoid them getting added to the archive by trying to pre-delete them before executing zipapp. .DS_Store files can add significantly to the size of the archive, possible have privacy implications (e.g. leaked spotlight comments), and serve zero purpose for the python app.
CPython versions tested on:
3.12
Operating systems tested on:
macOS
Linked PRs
- gh-120537
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the python3.12 -m zipapp command shown in the report and reproduce it on macOS using a temporary app directory containing .DS_Store files. Done means generated archives no longer include those files; check the archive contents with unzip -l as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 25/100