Skip to content

Add warnings for problematic entry point configurations#2197

Open
wolfv wants to merge 2 commits intomainfrom
claude/investigate-issue-1129-soMeX
Open

Add warnings for problematic entry point configurations#2197
wolfv wants to merge 2 commits intomainfrom
claude/investigate-issue-1129-soMeX

Conversation

@wolfv
Copy link
Member

@wolfv wolfv commented Feb 21, 2026

Summary

This PR adds two warning messages to help users identify potential issues with entry point generation and Python script placement in noarch packages.

Key Changes

  • Prefix path validation: Added a warning in create_entry_points() when the prefix path contains spaces, since shebang lines on Linux don't support quoted paths and generated entry point scripts may fail to execute at runtime.
  • Unregistered Python scripts detection: Added a warning in file_mapper.rs when a noarch Python package contains executable scripts that aren't registered as entry points, suggesting users add them to the build.python.entry_points section of their recipe.

Implementation Details

  • Both warnings use the tracing::warn! macro for consistent logging
  • The prefix warning checks the output prefix path and alerts users before entry point generation
  • The script warning provides actionable guidance by showing the exact path and suggesting the proper configuration approach
  • These warnings help prevent runtime failures and guide users toward proper package configuration

https://claude.ai/code/session_016bzsHmePT17vDZDkYLtF5M

- Warn when a noarch:python package contains scripts in bin/ or Scripts/
  that are not registered as entry_points. These files get remapped to
  python-scripts/ instead, but using entry_points in the recipe is the
  preferred approach for Python executables.
- Warn when a prefix path contains spaces, since Linux shebang lines do
  not support quoted paths and generated entry point scripts may fail to
  execute at runtime.

https://claude.ai/code/session_016bzsHmePT17vDZDkYLtF5M
Instead of warning at the point of file remapping / entry point creation,
emit these warnings in print_enhanced_file_listing where all other
packaging warnings (symlinks, file size, path issues) are already shown:

- noarch:python files placed in python-scripts/ now get an inline
  per-file annotation in the file listing, consistent with how other
  path warnings are shown
- prefix-with-spaces warning is now emitted (and recorded in the build
  summary) during the file listing phase rather than during entry point
  generation

https://claude.ai/code/session_016bzsHmePT17vDZDkYLtF5M
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants