indygreg / indygreg/PyOxidizer
Check zip-safe in addition to __file__
- Dominant language
- Rust
- Stars
- 6.2k
- Forks
- 256
- PR merge metrics
- No merged PRs in 30d
Description
The (not-)zip-safe file in the package metadata is often a good indicator of whether `__file__` is being used. By default setuptools creates that file doing similar inspection that PyOxidizer is doing.
However packages which use `__file__` but also fall back gracefully can override it with `setup(zip_safe=True)`. This scenario could be used to turn off the notice about `__file__`, and instead provide a list of packages which have overridded `zip-safe`.
The presence of `not-zip-safe` means there is already existing metadata declaring the package can not be safely used except on-disk. IMO these should be a build time error, bypassed only with an `--ignore-zip-safe` or similar.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing PyOxidizer's existing __file__ inspection and the handling of package metadata generated by setuptools. Determine how not-zip-safe and an overridden zip_safe=True should affect notices, and define the build-time error and --ignore-zip-safe behavior described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100