Rewrite shebangs generated by the python plugins.
Metadata
Current evaluation
Merged changes that rewrite Python plugin shebangs to use env instead of hardcoded paths, resolving Launchpad bug #1597919. After adding requested integration tests, the changes were approved and merged across 13 files.
Suggested action: —
No scores available.
Issue body
This PR resolves LP: [#1597919](https://bugs.launchpad.net/snapcraft/+bug/1597919) by walking through the install directories for python{2,3} parts, ensuring all python shebangs are using `env` instead of being paths.
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged changes that rewrite Python plugin shebangs to use env instead of hardcoded paths, resolving Launchpad bug #1597919. After adding requested integration tests, the changes were approved and merged across 13 files. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged after incorporating requested integration tests and a Launchpad reference. Resolves LP #1597919 by rewriting Python shebangs to use env instead of hardcoded paths across install directories. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged a fix that rewrites Python plugin shebangs to use env instead of hardcoded paths, resolving Launchpad bug 1597919. Integration tests and a reference comment were added per reviewer feedback before final approval. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1719 many: account for python shebang args in rewrite | snapcraft | merged | Merged after reviewer approval and passing tests. Unifies Python shebang rewrite logic to properly handle arguments instead of relying on /usr/bin/env. Resolves Launchpad bugs #1730472 and #1673451. | |
| #830 python plugin: only replace proper shebangs. | snapcraft | merged | Merged a python plugin fix that restricts shebang replacement to file beginnings. Approved by one reviewer, the change resolves plainbox snap conflicts with a +6/-1 diff across two files. | |
| #311 plugins: fix python shebang | rockcraft | merged | Merged a fix for the Python shebang in plugins. The change replaces hardcoded interpreters with ${PARTS_PYTHON_INTERPRETER} to respect user overrides. Approved by two reviewers and merged. | |
| #2112 repo: fix all python shebangs in stage-packages | snapcraft | merged | Merged fix aligns Python shebang replacement in stage-packages with standard plugin behavior, applying it throughout the entire part instead of only bin directories. Removes sitecustomize.py to prevent part clashes. Resolves LP: #1766662. | |
| #649 Use '/usr/bin/env python3' | snapcraft | merged | Merged an external contribution updating shebangs to /usr/bin/env python3 across two files, resolving Launchpad bug LP:#1602379. Accepted without review comments or CI checks. | |
| #823 plainbox-provider plugin: rewrite python shebangs | snapcraft | merged | Merged rewrite of Python shebangs in the plainbox-provider plugin to use /usr/bin/env python. Approved by two reviewers across five files. Resolves LP: #1626587. Missing unit tests were noted but acknowledged as unavailable. |