Tq remove dist info - #30503
Conversation
Formality Check: FailedWe checked this pull request against the contribution guidelines. Here is what needs your attention: 🛑 CRITICAL ERRORS
Tip Do not close this pull request to make corrections. Instead, modify your existing commits (e.g. Something broken? Consider reporting an issue. |
756a3b6 to
ceb0c57
Compare
|
Not sure whether this actually breaks some OSS license? I'm not a lawyer... It does saves a small amount of space on our devices, which for us is crucial. |
Add -? operator to filespec, to delete a file if present, and do not fail if not present. Rationale: sometimes it's hard to know if the file really exists, e.g. when writing a default filespec. Signed-off-by: Jan Kardell <jan.kardell@kramnet.se>
The .dist-info files are not actually used, and take up some unnecessary space on space constricted devices. Signed-off-by: Jan Kardell <jan.kardell@kramnet.se>
ceb0c57 to
0faafd4
Compare
|
Since I'm retiring, I have hanged my e-mail from jan.kardell@telliq.com to jan.kardell@kramnet.se. Github still picks up the old address somewhere and complains about the signed-off. |
|
|
||
| define Py3Package/filespec/Default | ||
| +|$(PYTHON3_PKG_DIR) | ||
| -?|$(PYTHON3_PKG_DIR)/*.dist-info |
There was a problem hiding this comment.
.dist-info is what importlib.metadata reads, so this is not dead weight: five in-tree runtime tests query it, e.g. lang/python/python-pytest/test.sh:8 (also python-pyopenssl, python-flask-socketio, django-restframework, utils/mpremote), and they will now fail with PackageNotFoundError — none of those packages override the default filespec. Entry-point discovery (importlib.metadata.entry_points(), used by pytest plugins and similar) breaks the same way, and a package cannot opt back in without replacing the whole default filespec. Please make this opt-in (a PYTHON3_PKG_* switch a package sets) rather than the default.
Generated by Claude Code
| rm -fR -- "$dest"/$path | ||
| ;; | ||
|
|
||
| -\?) |
There was a problem hiding this comment.
nit: the filespec operators are documented in lang/python/README.md:300-309 — the format line still reads <one of: +-=> and there is a bullet per operator. Add -? there in the same commit.
Generated by Claude Code
📦 Package Details
Maintainer: @commodo
Description:
By default remove the .dist-info files
🧪 Run Testing Details
✅ Formalities
If your PR contains a patch:
git am(e.g., subject line, commit description, etc.)
We must try to upstream patches to reduce maintenance burden.