Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions lang/python/python-package-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,16 @@ while IFS='|' read -r cmd path file_mode dir_mode; do
rm -fR -- "$dest"/$path
;;

-\?)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

log "Optionally removing: \"$path\""

if ! path_exists "$dest" "$path"; then
log "\"$dest/$path\" not found"
else
rm -fR -- "$dest"/$path
fi
;;

=)
log "Setting recursive permissions \"${file_mode:-(none)}\"/\"${dir_mode:-(none)}\" on \"$path\""

Expand Down
1 change: 1 addition & 0 deletions lang/python/python3-package.mk
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ endef

define Py3Package/filespec/Default
+|$(PYTHON3_PKG_DIR)
-?|$(PYTHON3_PKG_DIR)/*.dist-info

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.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

endef

# $(1) => package name
Expand Down
Loading