Skip to content

Exclude files listed in scripts from auto-discovered py_modules - #5301

Open
DSeaStar wants to merge 1 commit into
pypa:mainfrom
DSeaStar:fix-3851-scripts-not-py-modules
Open

DSeaStar wants to merge 1 commit into
pypa:mainfrom
DSeaStar:fix-3851-scripts-not-py-modules

Conversation

@DSeaStar

Copy link
Copy Markdown

Fixes #3851.

Auto-discovery treated a top-level script.py as a py_module even when that file was already listed in scripts=. The resulting wheel then installed the same file into both scripts and purelib.

Skip those filenames during flat- and src-layout module discovery so they stay scripts only. A neighboring real module is still discovered.

A lone script.py given via scripts= was also treated as a top-level
module, so the wheel installed it into both scripts and purelib.
@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Tick the box to add this pull request to the merge queue (same as @mergifyio queue).

  • Queue this pull request

@DSeaStar

Copy link
Copy Markdown
Author
  • Queue this pull request

@DSeaStar

Copy link
Copy Markdown
Author

@Mergifyio queue

@mergify

mergify Bot commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

queue

☑️ Command disallowed due to command restrictions in the Mergify configuration.

Details
  • sender-permission >= write

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.

[BUG] A single-script package puts the script in purelib *and* scripts

1 participant